Tiff compression

Use libtiff for writing any compressed tiff files, Fixes #659, #431