Move some of the audio provider machinery to libaegisub

And add tests.
Add tests for the audio bitdepth conversions

And fix some bugs in it, and make it not rely on undefined behavior.
Reuse the decoding buffer in the bitdepth converter