mplayer: reduce redundant use of VOCTRL_SET_CURSOR_VISIBILITY

If the cursor was un-hidden, and the mouse is moved again, don't send a
command to hide the cursor again.
windows support: move timeBeginPeriod(), remove timeEndPeriod()

There's not the slightest reason why timeBeginPeriod() should not be in
InitTimer(), which was made to hide away OS-specific timer calls. Make
sure it's called after SetErrorMode() just to be sure, though.

Remove the timeEndPeriod() call, which is kind of an eye-sore. According
to MSDN, Begin/End calls must be matched, but I since this is at program
termination anyway, I don't care.
osdep: refactor timer code, add 64 bit timer function

Make OS specific timer code export a mp_raw_time_us() function, and
add generic implementations of GetTimer()/GetTimerMS() using this
function.

mpv code is actually supposed to call mp_time_us(). The following
commit will add code to mp_time_us() to guarantee monotonic and
wrapping-free time reporting.

Move the test program in timer-darwin.c to timer.c, and modify it to
work with the generic timer functions.
timer: clamp time if it's going backwards