Taskframemanager deepsleep

Hi Stef,

These commits makes the TaskFrameManager use a Timer instead of a Thread. This allows to stop the timer when there is no TaskFrame, which is a good thing I think....

By the way, I believe I fixed a possible a threading problem in commit  	34b0ad4.

I tried to split the changes in simple commits to make sure I did not make bad mistakes ;)