Typing and better queries

We can support typed metadata, to provide more search types than string equality. To do that, the 'metadata' table will need to be duplicated (one per 'value' column type).

So long as the type of the metadata we're requesting is known, this isn't too hard.

SQLite has [only 4 datatypes](http://sqlite.org/datatype3.html) (plus NULL):
* REAL: 8-byte IEEE float. We probably want to support range searches.
* INTEGER: signed integer stored on 1 to 8 bytes. We could also just use floats for both.
* TEXT: unicode string. We support this.
* BLOB: byte array. Probably not needed?

Of course other SQL backends would have more data types.