player: improve audio time display

This commit fixes a "cosmetic" user interface issue. Instead of
displaying the interpolated seek time on OSD, show the actual audio
time.

This is rather silly: when seeking in audio-only mode, it takes some
iterations until audio is "ready", but on the other hand, the audio
state machine is rather fickle, and fixing this cosmetic issue would be
intrusive. So just add a hack that paints over the ugly behavior as
perceived by the user. Probably the lesser evil.

It doesn't happen if video is enabled, because that mode sets the
current time immediately to video PTS. (Audio has to be synced to video,
so the code is a bit more complex.)

Fixes #1233.
mp_image: check memory allocation
audio: handle reinit after AO reload slightly cleaner

Don't print bogus messages about packets read in verbose mode.
audio/out: make ao_request_reload() idempotent

This is what you would expect. Before this commit, each
ao_request_reload() call would just queue a reload command, and then
recreate the AO for the number of times the function was called.

Instead of sending a command, introduce some sort of event retrieval
mechanism. At least for the reload case, use atomics, because we're too
lazy to setup an extra mutex.
video/out: minor simplification to event query function

The "clear" parameter is confusing and useless.
ao/wasapi: new wasapi device monitoring interface

implement IMMNotificationClient to watch for changes in the sound device

http://msdn.microsoft.com/en-us/library/windows/desktop/dd371417%28v=vs.85%29.aspx

Signed-off-by: Kevin Mitchell <kevmitch@gmail.com>
ao/wasapi: request reset when device changes state/properties

thanks to Jonathan Yong <10walls@gmail.com>
ao/wasapi: improve error messages and add more debug statements

thanks to Jonathan Yong <10walls@gmail.com>
ao/wasapi: fix leaked deviceID

thanks to Jonathan Yong <10walls@gmail.com>