the main change is that WM_QUIT now causes the thread to be
cancelled instead of mainLoop() just returning. this also
requires runDaemon() to call the run function in a new thread
each time it calls it because it could can cancelled.
MsgWaitForMultipleObjects(): it will not return immediately
if an event already in the queue when it's called was already
in the queue during the last call to GetMessage()/PeekMessage().
also now discarding screen saver events if there are any other
screen saver events in the queue already. this prevents these
events from piling up in the queue, which they'd do because we
sleep for 250ms when handling each one.
work but will let testers make the final call. also fixed
desktop synchronization by setting a variable that was
mistakenly left unset. and tried to work around an apparent
bug in MsgWaitForMultipleObjects() that prevented the service
from closing down properly. start/pause/continue/stop
sequence still doesn't shut down correctly. start/pause/stop
and start/stop work fine.