Several improvements in timer scheduler

Now timers are stored and stopped when thread is stopped.
Some changes in tasks list
Moved some maps related code around