What happens if everyone discovers much faster way of solving hash function problem (mining)?
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...".