Shape effects on the electronic structure and the optical gain of InAsN/GaAs nanostructures: From a quantum lens to a quantum ring