Apply quality option only to JPEG images

The quality option is specific to JPEG and should not be applied to other formats. For instance, it could lead to wrong PNG compression level.

Also fixed a possible error (imagepng() arguments shifted) in GD with PNG if filter specified but not quality.
Add "png_compression" option

Takes an integer from 0 to 9.