tests: Add tests for timers

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
lib: remove unused thread_master_debug function

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
lib: use heap to manage timers

Signed-off-by: Christian Franke <chris@opensourcerouting.org>