reorganize jpeg functions
a separate quantization matrix scaling function

fix header includes
fix IDCT
clean up tests & makefile