add color profile extraction to jpeg, tiff and png

I add color profile support for jpeg, tiff and png.
Please review it.

Thanks 
marker_size is set but never used. Can you look over this section and make sure you think it's correct? Did you intend to pass marker_size to jpeg_write_marker?