It's grammatical, therefore would not have been turned shouldn't be replaced with hadn't been turned. The punctuation, though, seems a bit strange.
if...vanquish is an interrogative (question) clause as object of demanded. The clause in turn contains a counterfactual conditional clause had Russia been vanquished and a main clause.
The whole interrogative can be thought of as coming from this original direct question:
The President asked: "If Russia had been vanquished, would the insurrection not have been turned against Prussia?"
Subject-auxiliary inversion for the conditional:
The President asked: "Had Russia been vanquished, would the insurrection not have
been turned against Prussia?"
Bringing the conditional after the main clause:
The President asked: "Would the insurrection not have been turned against Prussia had Russia been vanquished?"
Turning into reported speech:
The President asked if/whether the insurrection would not have been turned against Prussia had Russia been vanquished.
Punctuation fix: I would use a period (.) instead of a question mark after vanquished in the reported speech clause. I would remove the single dangling double quote (") before if.
This was written in 1864. I wonder if the punctuation would have been perfectly fine then.
"He would have had to have been there" means that, in order for him to have accomplished whatever he accomplished, it would have been necessary for him both to be there and then to leave. In other words, whatever he was supposed to have done could not have been accomplished only by him being there.
Most commonly, however, the action done at the place is simply done at the place, and leaving the place is not required to perform the action. Therefore, we usually say something like, "For him to do what he did, he would have had to BE at that place," because merely being there is adequate to the task. Leaving the place has nothing to do with what he did while he was there.
A quick example: "For Watson to have murdered Lestrade, he would have had to be at Lestrade's apartment." This says it was necessary for Watson to be at Lestrade's apartment (given that the murder occurred in the apartment), but accomplishing the murder did not in some way require Watson BOTH to be there AND to leave.
Now, "have been there" is also logically quite possible. Let's say Sherlock determines that although Lestrade was murdered in Piccadilly Circus, the murderer couldn't have done it unless he had previously been at Lestrade's apartment to see Lestrade's calendar and thereby to know when Lestrade would be found at Piccadilly. In which case, for Watson to have murdered Lestrade, he would have had to have been at Lestrade's apartment beforehand; in other words, Watson would have had to be at Lestrade's apartment and also to leave the apartment (to go to Piccadilly to commit the murder).
Now, all this having been said, we don't usually construct the sentence as elaborately as in the first example ("would have had to have been"). It is not necessary to put the main verb into the conditional present perfect ("would have had"). We usually say simply, "would have to have been."
Best Answer
Here is a video talking about several inversion forms including this one (at around 4:00)
http://www.engvid.com/english-grammar-inversion/