Simplify arguments to compute_mcu_start()
Fix latent bug in restart marker thread unpause logic

When we start allowing multiple simultaneous JPEG readers, we will need
to ensure all of them are finished before signaling the restart marker
thread to unpause.
Always access mcu_starts via helper function

Add compute_mcu_start() wrapper that handles all access to
one_jpeg->mcu_starts.
Add test program for parallel reads
Only take restart_marker_mutex while accessing restart markers

rather than holding it throughout paint_region().  This was serializing
multi-threaded JPEG accesses.  Closes #88.
Move cache locking into openslide-cache.c

There's no value in forcing each ops backend to implement its own cache
lock.
Pass extra void * argument to tile reader function
Allow multi-threaded access to TIFF files

by opening multiple TIFF handles.  Thanks to John Cupitt for the
suggestion.  Closes #39.
Document API thread safety
Limit restart marker thread to JPEGs with more than one marker

The restart marker thread was reading and parsing the JPEG header of
each MIRAX tile, even though restart markers are not useful on MIRAX.
To avoid unnecessary background I/O, have the thread ignore JPEGs with
only one MCU start.
Drop NULL filename tests in JPEG backend

No vendor driver should register a JPEG with a NULL filename.  Assert
this in init_one_jpeg() and stop handling it in the rest of the backend.
Drop redundant test
Check unreliable_mcu_starts when searching backwards

_compute_mcu_start() was not checking unreliable_mcu_starts when
searching backwards for a valid start.  So, rather than searching only
until the beginning of a row in Hamamatsu VMS, we were continuing until a
previously-computed start or the beginning of the file.  An early read
of a down-file tile would cause us to compute thousands of MCU starts in
one go.
Add test case for Aperio JPEG2000 33005
Add experimental tile-width/tile-height properties

Add undocumented properties called e.g. "openslide.level[1].tile-height"
giving the tile size.  This helps applications align parallel accesses to
avoid multiply decompressing the same tile.  Omit the properties for
slides with overlaps or funny business.

Pursuant to #37.

Original-version-by: John Cupitt <jcupitt@gmail.com>
misc: Add script to create fake Hamamatsu VMU slides
Switch to new glib deprecation-control macros

glib 2.32 deprecates and replaces parts of the thread API, but we still
need to support 2.16.  Rather than adding a pile of compatibility
wrappers, we will continue with the old API for now.

Stop defining G_DISABLE_DEPRECATED; it no longer means much in current
glib (it doesn't affect function declarations).  Instead, use
GLIB_VERSION_MIN_REQUIRED to disable warnings for newly-deprecated
things and GLIB_VERSION_MAX_ALLOWED to issue warnings if we use
newly-created things.  (This only works for functionality added since
2.26 where the glib developers have remembered to declare
GLIB_AVAILABLE_IN_x.)
Update for release
test/test: Restore use of round()

We no longer need to avoid round() because we no longer build with MSVC.
Fix rounding when selecting tiles in a region

When the right or bottom edge of a requested region fell on a tile
boundary, we were decoding one too many tiles on that axis.  This was
causing redundant decoding with applications doing tile-aligned parallel
reads.

Reported-and-diagnosed-by: John Cupitt <jcupitt@gmail.com>