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 pull request #16 from frodeaa/master

Fix crash when handling empty playlist
Merge remote-tracking branch 'origin/master'
fix decode of dmenu items

the items.index failed in my setup errors like

   ValueError: '[ Playlists ]' is not in list