Merge "Fix memory leak and slopiness around the uncompressed ANS buffer." into nextgenv2