Improve I/O of embedded ICC profiles (affects TIFF and PNG I/O)

This adds the ability to load/save an embedded ICC profile to/from TIFF files, and makes some small improvements (not using std:: string to hold an array of bytes) to the PNG ICC load/save code.

Also includes some of my previous fixes for TIFF I/O, and some improvements to those for clarity / readability / correctness.