simavr: Improved accuracy of sleep durations
This commit solves (or at least improves) an issue that occurs when
short sleep times are requested in avr_callback_sleep_*. The operating
system cannot accurately handle short sleep requests, and sending many
short requests takes significantly longer than requesting the equivalent
time in longer bursts. This can be observed by running the board_hd77480
example - the counter is much slower when vcd recording is turned on
(= short sleep requests) than when it is turned off (= long sleep
requests).
We improve this situation by accumulating sleep requests until a certain
minimum count of pending usecs is reached which can be handled somewhat
accurately (200 microseconds worked well for me).