Punch line is the final part of the joke which makes you understand the meaning of the joke and that it is a joke.
Many dot-com businesses were so extremely uncommercial that looking back it is funny that people believed they might be worth investing in. Amazon was not one of those.
The OED (1st edition—another answer supplies a more recent treatment) regards this as a (usually Scots) variant of older -a, both being common tags on the rhyming words in popular ballads (-o from 1727, -a from 1567). See this and this for examples. Note that the convention is only to record the extra syllable in the first stanza, no doubt to save the printer effort.
At A, inter., 4 OED conjectures that it arose in "the necessary retention of ME. final -e where wanted for measure" (that is, meter). I can adduce no example, nor is it likely that any could be found, since would have occurred in the spoken (or sung) language's evolution—and certainly before printing and a rising middle-class market provided an incentive to record such vulgarities.
Uniting arguments at both A and O, we find it implied that over the course of time this extra syllable came to be regarded as an interjection, Ah! or Oh!, evolved thence into a stock ornament of popular song, and eventually became so identified with the genre that it became a 'signature' of burlesque balladry.
This seems very plausible to me. -o marks the genre—and incidentally provides the balladmaker additional melodic opportunity.
EDIT:
I believe this answers your question with respect to your first two quotations. In the third o more likely represents a weary interjection. @tchrist's answer seems to me to address your penultimate paragraph.
I can't compete with @tchrist's Tolkien quotation, but I can provide an instance of 'burlesque', from W.S.Gilbert's Yeomen of the Guard:
I have a song to sing, O!
Sing me your song, O!
It is sung to the moon
by a love-lorn loon
Who fled from the mocking throng, O!
It's the song of a merryman, moping mum,
Whose soul was sad, and whose glance was glum
Who sipped no sup and who craved no crumb
As he sighed for the love of a ladye.
Sullivan's tune's pretty nifty, too.
Best Answer
In the context of the song, it seems to mean something like "it doesn't get better than this." That's not typically what the expression means.
Wiktionary has these definitions:
You would typically use it to mean that whatever you're engaged in is over, has run its course, there's nowhere else for it to go. Dictionary.com gives the examples of a presidency term (s/he could never get re-elected) or a TV serial (declining viewership, it's time to stop the show).