We don't have to keep track of this much data between rects, so restructure things to make it more simple. This allows the JPEG parsing code to be a pure function which only depends on the input.
Add support for RealVNC's JPEG encoding. Add tests for JPEGDecoder. Fix the corner case of caching Huffman or quantization tables.