The previous code would clear the proper interrupt flag assuming
interrupt1 was INT0 and interrupt2 was INT1. If interrupt1 was INT1 or
interrupt2 was INT0, the sleep bug would be triggered.
Round requested sleep time up to next multiple of 16ms, to sleep at
least requested time.
Sleep time of 0 will return immediately.
Fixed watchdog sleep time calculation. AVR libc watchdog time
implementation is inconsistent, and requires larger flash/ram usage.