TIF output support of Exif (only available for libtiff >= 4.0.2)

Earlier versions of libtiff (including the version that was current when
we added Exif reading to our tiff support) supported reading Exif, but
not writing Exif. Later versions of libtiff have added this capability.
Make TIFF error message storage thread-safe
Add missing EXIF 2.3 tags. A small number were not present in our table.
Merge pull request #882 from lgritz/lg-exif

TIF output support of Exif (only available for libtiff >= 4.0.2)