What happens if everyone discovers much faster way of solving hash function problem (mining)? The question is not about how bitcoin mining works, but rather how bitcoin system adapts to progress in ability to tackle proof-of-work problems.

Suppose that proof-of-work problems used for bitcoin mining become very easy to solve. (eg. P=NP with very fast practical polynomial-time solver, though of course unlikely, but let me play a hypothetical game.) Then it seems that bitcoin system would collapse - 32-bit nonce may be insufficient to counter how fast proof-of-work can be done, in case that this becomes reality.

Is there any part in the current bitcoin implementation that would protect the bitcoin ecosystem from this type of collapse? Is the "difficulty target" system enough to resolve the hypothetical issue?
They already did find a faster way. Bitcoin mining now is run on specialized ASIC chips but it wasn't always that way. In early days it was CPU or GPU. 

So nothing happens really, difficulty will adjust so that new blocks are found every 10 minutes on avg. 

If this new mining tech is only in the hands of one entity though, then they could potentially do bad things, but your question was "What happens if everyone...".