iv_timer: Implement fairness for timers.

Split the dequeueing of expired timers and the running of their
handlers into two separate phases, to prevent the situation where
timer handlers registering timers in the past cause execution of
tasks and file descriptor or handle handlers to be starved.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Add test/timer_fairness, a test to verify timer fairness.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>