First of all, let's be clear that ain't is not commonly used in proper and correct speech. It is a word, it is technically correct, and it does take the meaning of "[to be] not", as you have surmised. However it is most often used in uneducated speech, so you must be sure to take everything with a grain of salt when you see it used. I certainly wouldn't suggest you begin using it in formal contexts.
Let's begin with your first assertion:
I ain't an idiot
expands to
I am not an idiot
Which, in my understanding means "Well, I am declaring myself an idiot"
Ain't does indeed expand to am not here, but it certainly doesn't mean that the person thinks they are an idiot. They are quite clearly saying that they are not an idiot (probably in response to someone who has said they are one). I am not [x] is always a claim that a person is not something.
It just ain't done good
expands to
It just have not done good
Which, in my understanding means "An action didn't generated good results of if"
Now we return to my original point that ain't is often used in uneducated speech. The formal way to say this would be "It just is not done well." This means that [x] action (or the result of said action) has not been performed properly. For example, a teacher could be looking at a student's painting in an art class, and comment that the painting was not done (ie. not painted) well. But ain't doesn't expand to have not here, as you suggest; it expands to is not (simply another form of [to be] not).
But I ain't marchin' anymore
expands to
But I am not marching anymore
Which, in my understanding means "I am saying, that I will stop marching"
Your expansion to am not is correct, and you've almost got the interpretation down; what this means is I am no longer marching. I have not been marching for some period time up until this point, and I will continue not to march. The distinction from your interpretation is that they are not saying "I will stop marching from this point forward." They have already stopped marching.
Hey, ain't gonna cry no more today
expands to
Hey, I am not going to cry no more today
This one is a bit weird, but in my understanding means "I am declaring my intentions of crying no more that I already did, today"
Again we return to the issue of uneducated speech; the ain't is actually completely straightforward in this example, it does indeed expand to am not. However you have a different problem which is displayed in uneducated speech; that of the word no used when it ought to be any. This could have been correctly written I ain't going to cry any more today (expanding to I am not going to cry any more today). This means that at some point today they have cried a certain amount, and intend to not cry again for the rest of the day. They will not cry any more (or any longer).
I ain't no quitter
expands to
I am not no quitter
Which, in my understanding means that "I am a quitter", since be first negation negates the second...
This example has the same problem as the last one; the ain't is straight forward but the no is incorrect. It should read I ain't a quitter (expanded to I am not a quitter). Which, similar to your first example where the person professes to not be an idiot, means that the person denies any accusation that they might be a quitter.
So, overall, be careful with ain't. You've got a good handle on the expansion overall, but you have to watch out for the extra no/not negations you might find. Use context to help you as much as possible; rarely would someone claim to be a quitter or an idiot, so your best guess should be that it means the opposite :)
Most of the time, especially in "vernacular" speech, multiple negations are not intended to be interpreted sequentially, but rather as an intensified single negative.
The phrase "This ain't no place for no hero", in normal speech, would be "this is no place for a hero." The additional negations intensify it, leading to a sense more like "This is absolutely not a place for a hero."
Similarly, "This ain't no place for no better man" means "This is not a place for a better man."
These sorts of multiple-negation phrases are absolutely NOT considered correct, standard, grammatical English, but are common vernacular.
Best Answer
Informal English sometimes uses what's called a "double negative" for emphasis, putting words like "ain't" and "nobody" together to reinforce how strong the negative is. ("Negative concord" is a more precise, but much less common, term for this.) Here, the quoted character is strongly protesting how little he desires to fight someone with a baby — this would be much less emphatic if he'd just said "I ain't trying to fight with anybody with a baby."