Support CATMAID stack scale and tile source type

For some projects SOPNET may work with downsampled images, so support a
stack scale parameter to fetch the correct image tiles and scale the
stack volume appropriately. All units for slices and segments are in
these scaled coordinates (in the PostgreSQL database also).

Also generate tile URLs based on stack's tile source type as reported by
CATMAID. For now the existing tile source type 1 is supported, and
support for type 5 has been added. Attempt to use stacks with
unsupported types throws an exception.
Fix getBlocksInBox integer ceiling division

A misplaced term from ceaf4c8dd67170145091b98686ff61593b2d351b caused
enormous numbers of blocks to be returned.
SegmentGuarantor: properly scope shared_ptr (minor)
SegmentGuarantor: fix log output (minor)