A rocky world orbiting a nearby star has been confirmed as the first planet outside our solar system to meet key requirements for sustaining life.