Adding Metadata to search results.

Search results can now have metadata attached to them using the same mechanism
as the /meta handler uses. The change also includes:
  * Some cleanup of the elasticsearch interface
  * Search Time and Total in search response
  * More tests
Most of this is implementation detail which doesn't deserve to be in a doc comment.

    // ListAllIndexes returns the names of all the indexes in the database.
    // http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/_list_all_indexes.html

should be sufficient, I think.