MBTiles Support

Squashed work from mbtiles branch.

Contributed by  Robert Oehler