Support irregularly sized tiles

Tiles along layer edges can now be clipped to the layer size. This
saves memory along tile edges.
Merge pull request #119 from mrobinson/stubby-tiles

Support irregularly sized tiles