I agree with you that this is a confusing statement! This answer is lengthy because I want to answer your questions thoroughly.
The first step to making it more understandable is to remove the unnecessary commas. (I'll focus on the second sentence, as that is the one you asked about specifically.)
This sagacious edict renders robbery unfrequent; the daring violator of the laws, hesitating to take with him those means which might preserve his own life or affect that of the plundered in the event of resistance, generally confines his depredations to acts of private pilfering, and a robbery attended with murder is, of course, very rarely perpetrated.
As you can see, removing the superfluous commas makes a big difference in readability. I can't give you an explanation for why the incorrect commas were there, but I can explain why the remaining commas are grammatically correct (which will also help to answer your first question).
Question 1a. What kind of grammar the sentence ", Hesitating..." has?
The commas after "laws" and before "generally" create a participial phrase. In this paragraph, "hesitating" is a participle.
A participle is a verb form that functions as an adjective by modifying nouns and pronouns. A participle can be either a present participle or a past participle. A participial phrase includes the participle, plus any modifiers and complements.
In this case, "hesitating to take with him those means which might preserve his own life or affect that of the plundered in the event of resistance" is a participial phrase. The phrase modifies the noun "violator."
The commas are required at either end of this participial phrase because it is non-restrictive.
A phrase is nonrestrictive (also called nonessential) if we know exactly who or what is being written about without the phrase. A nonrestrictive phrase is simply adding extra information. Nonrestrictive phrases need commas around them.
Because we know whom the participial phrase modifies ("violator"), and because the information the phrase provides is extra, not essential, we know the phrase is nonrestrictive. As such, it must be set apart by commas.
Question 1b. What is the meaning of this sentence?
Let's back up to the beginning of your quoted material. The first sentence states that, by law, a person convicted of robbery will not be sentenced to death " . . . provided he neither uses, nor carries, any offensive weapon."
This means that despite the fact that circumstances may arise during a robbery to threaten the safety of either the thief or the person the thief is robbing, thieves rarely carry offensive weaponry. They know that, should they be carrying weapons when they are caught, they could be sentenced to death. They also know that if they are not carrying weapons when they are caught, they cannot be sentenced to death. Therefore, thieves tend to limit themselves " . . . to acts of private pilfering." Additionally, robberies that result in murders are rare.
Question 2. What is the subject of confines?
"Violator" is the subject of "confines." The clause that precedes the semicolon has its own subject and verb, so start after the semicolon.
The daring violator of the laws, hesitating to take with him those means which might preserve his own life or affect that of the plundered in the event of resistance, generally confines . . . .
To find the subject and verb in a sentence, break down the sentence to its simplest form. The subject has to be a noun or pronoun, and the verb has to be, well, a verb:
"The" is a definite article. "Daring" is an adjective. "Violator" is a noun. "Of the laws" is a prepositional phrase. As previously discussed, "hesitating" through "resistance" is a participial phrase. "Generally" is an adverb. "Confines" is a verb. There you have your subject and verb: "violator" and "confines."