Some post-wowhack merging

This merges some changes, in preparation of the FLAC work done at
Way out West hack battle.

This should bring us a bit closer to fixing/merging the FLAC decoder.
Needs some more work first though.

Most of the new stuff is even more alpha quality, since I wrote it at a
hackathon.