fix excessive CPU consumption of timer_server

I've found stdlib's timer to burn CPU without good reason. Here's what
happens.

The problem is that it sleeps in milliseconds but computes time in
microseconds. And there is bug in code to compute milliseconds to
sleep. It computes microseconds difference between now and nearest
timer event and then does _truncating_ division by 1000. So on average
it sleeps 500 microseconds _less than needed_. On wakeup its checks do
I have timer tick that already occurred? No. Ok how much I need to
sleep ?  It does that bad computation again and gets 0
milliseconds. So next gen_server timeout happens right away only to
find we're still before closest timer tick and to decide to sleep 0
milliseconds again. And again and again.

This commit changes timer so that it keeps track of time in
milliseconds. The idea is given all intervals and sleep durations are
in milliseconds anyways, there's no benefit at all keeping track of
time in microseconds.