The bedtime gadget that’s been illuminating our nights for over a century hides a surprising history and some clever hacks.