lightd: move to timerfd for timing
lightd: reduce cpu load
wrong logic in timer_state_init