Support large image sizes.

Image dimensions up to 32767 are now supported. Protocol supports
coordinates up to 2^32. Total image area is (arbitrarily) limited to
around 250 megapixels.

Issue #101