Rogue waves in multiphase solutions of the focusing nonlinear Schrödinger equation