Nature and evolution of the band-edge states in few-layer phosphorene