Use SQLite to cache resources

Implement part of #446:

SQLite-related tasks:

* [x] Store expiration date
* [x] Store resource type
* [ ] Perform conditional GETs if we already have the data, but it's expired
* [ ] Update tiles after their expiration date (first, show old tile, load new tile (if network available), store it in DB, and update the displayed tile)
* [ ] Make querying asynchronous
* [ ] Implement database size limit
* [x] Compress data stored in database (zlib? snappy? lz4?)
* [ ] Store database in correct location (use `platform::` callback to determine)
* [x] Remove access_token from URLs before storing them in the database
* [ ] Measure SQLite query performance
* [x] Store non-200 results
* [ ] Handle corrupt databases
* [ ] Add offline-only mode