Do FORMAT_NOT_SUPPORTED checks in separate format method
tifflike: Receive filename in _create(), not FILE *
tifflike: Fix leak in error path
tifflike: Move handling of inline values into read_directory()
tifflike: Add helper function for computing value sizes
tifflike: Return GError from accessors
tifflike: Add GError argument to _openslide_tifflike_get_buffer()
tifflike: Read non-inline TIFF values on demand

tifflike is currently used only by NDPI, but we probe for NDPI before any
of the other TIFF-derived formats.  So, for non-NDPI TIFFs, we were
reading in the entire TIFF directory structure and then throwing it away.
Reduce I/O overhead by reading only the directories and inline values,
and then loading non-inline values on demand.
tifflike: Convert value data on read, not on use
tifflike: Provide separate accessors for array and first element
tifflike: Support get_buffer() with TIFFTAG_XMLPACKET
tifflike: Make accesses thread-safe

Some locking is necessary now that we read non-inline values on demand.
tifflike: Fix out-of-bounds access populating rational values

Set item->count doubles, not 2 * item->count.
tiff: Don't check TIFF validity in _openslide_tiffcache_create()

The caller will always call _openslide_tiffcache_get() and can check for
errors at that point.
Unify error paths in aperio and trestle open functions
Pass tifflike, not tiffcache and TIFF, to TIFF format methods

We have to create a tifflike anyway for NDPI, so for efficiency we might
as well use it for all format detections.  Also pass it to the open
methods for their convenience, but require them to go get a TIFF * if
they want one.

Also: when we were passing a TIFF * we couldn't try opening the TIFF file
until after the NDPI detector ran, since otherwise libtiff would spew
error messages on NDPI slides.  We will now be able to try opening the
TIFF before running any format detections.

Always destroy the tifflike after the open method completes, even on
success.  If some backend needs otherwise, tifflike will need to grow
ref and unref methods.
hamamatsu: Use passed-in tifflike in NDPI format methods
Unify TIFF and non-TIFF format methods
Merge try_format() with its helpers
Restructure format selection code