This commit fixes an issue where RateConverter would
sometimes chop off the very end of an audio stream. This
happened when the RateConverter would have some
data left in its internal buffer, but the source stream was
already fully read. The base RateConverter class now has
a needsDraining() function which indicates leftover data,
and relevant code now uses it when needed.
The RateConverter class has been modified to allow for
variable input and output rates. The optimized code paths
for copy/simple conversions are retained, but have been moved
inside separate functions instead of subclasses. The templatization
of the stereo parameters has been maintained, and is implemented
via the newly-added RateConverter_Impl template class.
Internal variables have been renamed to be more readable. The
flow() function has been renamed to convert(). The drain()
function has been removed, since it was never implemented
or used anywhere.