Interplay between structure and superconductivity: Metastable phases of phosphorus under pressure