Fix tiled TIFF reading and writing (rebased onto develop)



This is the same as gh-871 but rebased onto develop.

----

Required for http://trac.openmicroscopy.org.uk/ome/ticket/11850.