Spontaneous coherence buildup in polariton lasers