JPEG qtables

Includes #677

* Adds tests
* Adds documentation of qtables and subsampling.