timer1: rename timer_init() to more appropriate timer_init_pwm1a1b()
Move (watchdog timeout -> reset) to util.c -> reset()
Move sleep_mode to util.c -> pause() (wait for interrupt)
Make code of xstrlen less ugly.
Fix problem where the cpu would get stuck in a sleep_mode(idle),
because the interrupt supposed to wake it, was already asserted
(just) before going into the sleep_mode. In this case skip the
sleep_mode and start processing the frame immediately.

Note: enc's interrupt gets only deasserted when all buffered frames
are read, it's not sufficient to reset the pktif flag, like the other
interrupt sources.