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
The documentation is here https://docs.google.com/a/canonical.com/document/d/1eo44uCVJfha6r0v2Jz-QxbbkHtsXrabTpj_Q_ulcis4/edit#heading=h.8jimvw5a50mr