Fix TIFFUnlinkDirectory(0) case and unlink of first directory.
Fix TIFFUnlinkDirectory(0) case and unlink of first directory.
If directory number 0 is unlinked, then the base offset variables within LibTiff are not updated. As a result, a subsequent TIFFSetDirectory() first goes to the unlinked former directory number 0.
In addition, the error case for dirn=0 is handled.
This MR fixes that by updating the base offset variables tif->tif_header.classic.tiff_diroff and tif->tif_header.big.tiff_diroff, respectively.