Add locking to mbtiles commits

Commit is a locking action -- without a lock can get sqlite3 transaction errors.