Edge tiles should not extend beyond the layer size

Instead of uniformly sizing tiles, size edge tiles to fit the layer
boundary (plus whatever is needed to round to the pixel boundary). This
should save memory along layer edges.
Merge pull request #101 from mrobinson/tiles-size-to-fit

Edge tiles should not extend beyond the layer size