N.K.'s declaration of war
Against whom?
Not really by the sanctions, but by lack of enforcement on the part of the allies.
Surely you've heard the argument that if Germany was given a voice during the Treaty of Versailles, then the people would never have suffered so much as to allow Hitler to rise for power. There's also the theory that the sanctions simply weren't strong enough, Germany should have been split into pieces and the people forced to watch as the enemy marched through their streets. A sudden burst of enforcement on part of the allies wouldn't have prevented German frustration and hatred from building up and more to the point, a war has multiple causes, there's never just that one thing that happened and caused a war.
With North Korea being the most threatening, they're practically an opposite, upside-down inside-out version of the US.
North Korea is far from an actual threat to the United States, the US without a doubt has the strongest military force on the planet, which considering nearly a trillion dollars goes into it annually, not so surprising. Economically even with the recent recession, the United States still controls one of if not the most powerful economies in the world an economy that can very easily be turned into a dedicated war machine if need be, which in the case of a WWIII, there would be need.
that the countries to join in first are always the ones that receive the hardest beating
That is because typically countries who join in first are those that are in close geographic proximity to their enemies, the United States has almost always been an ocean or two away from the conflicts it takes part in. It was simply impossible to target the mainland, unlike in Europe where everyone is packed so close together that attacking each other is child's play.
China backs North Korea quite a bit, so we might even end up in a China vs. US type of war... which would be hell for both sides.
No, we would not. China does not value an alliance with North Korea so greatly that they would risk combating the United States. Not only for the military reasons mentioned previously buy consider the fact that an absolutely staggering amount of US imports and foreign investment comes from Chinese businesses. A war between the two nations would hurt both, but China would feel the pain more acutely simply because a war of such scale would most likely drag in other western nations which would probably result in a greater drop in China's GDP.
"bad guys"
And they would be? Egypt and Saudi Arabia, two of the strongest states Middle East both have strong ties with the United States. Quite literally the only nation in the middle east that wishes to and would even consider engaging the Middle East would be Iran.
The US still practices the ideal of massive retaliation against nuclear weapons
Whomever told you that, lied. Massive retaliation was abandoned under Kennedy, else the world would've ended in a nuclear apocalypse long ago. More to the point, the United States, along with the United Nations practices the idea of collective security, if one member is attacked, all members retaliate or at least agree not to interfere, the Gulf War was a great example of collective security in action.
Overall, my point is simply this, states think rationally, they make decisions based on how it effects them. If the costs outweigh the benefits, there has to be a very good reason for a state to choose that path. For most states in the world, a full out war with any other major power would not be beneficial, and as a result would not happen.