Rewrite g_string_replace() to be simpler and safer

Fixes #9.
Add get_audio_buffer_stats support for audio plugins

This allows libspotify to query the audio buffers. It's still optional:
right now, only the ao plugin implements that (and in a probably
non-optimal way).
Copyright update, 2014 edition
ao: Close the device if no output for a few seconds
Merge remote-tracking branch 'origin/master'