bz19972: Bunch of playback fixes

That ticket lists all the things going wrong, hopefully this change
fixes them.

Also fixed PlaybackPlaylist code so that it detects if the currently
playing item is deleted/changed unplayable.  If that happens, we stop
playback.  I think this was happening before because of other playback
code, but I think it's cleaner for PlaybackPlaylist to detect it.

Added tests for playback playlist code.