Phase Transition and Self-Stabilization of Light-Mediated Metal Nanoparticle Assemblies.