restart the digispark on wake
Only sleep/wake when receiving interrupts

when micronucleus runs it sets up the USB configuration. So on first
plugin, the computer recognizes it as a USB device and continuely sends
heartbeat messages. Every other time, the digispark is not a USB device
so the computer won't send heartbeats. It does, however, receive a few
events when the hub is first plugged in and after it is unplugged so we
switch between wake and sleep events whenever we see activity on the USB
data pins. Also added a 10 second timeout so it can reach a steady
state.
To get this to work properly, plug the digispark into the USB hub--while
the hub is disconnected from the computeer--and wait 10 seconds. The lamp
should not light up. Then you can plug the hub into your computer and
the lamp will turn on.