timer_task: use external lock

timer_task has an internal mutex lock which protects various timer_task
operations. This patch changes the lock to a reference to an external
lock. This way, instead of doing recursive locking, we can share the lock
with serial_timer_task's mutex lock.

tests/tst-async.c is modified to use the new locking scheme.

Signed-off-by: Asias He <asias@cloudius-systems.com>
Reviewed-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>