Improved completion of cycle & mode select

Now the lamp won't turn off after the session length unless the
brightness is below a certain threshold (currently 5). This makes the
shutoff less jarring and makes sure that it isn't during a breath. Also,
I now made it such that the device will cycle between the 4 modes and
off when in selection mode.