A super-Earth planet that dips in and out of its star's habitable zone has been discovered just 19.7 light-years away.