internal/v4: fix meta endpoints

We were printing duplicate endpoints in the /meta list.
Also, when retrieving /meta/any with all meta endpoints included,
it was failing because color was not recognised.
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
Merge pull request #159 from mhilton/search-metadata

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
Merge pull request #163 from rogpeppe/072-fix-metadata

internal/v4: fix meta endpoints

We were printing duplicate endpoints in the /meta list.
Also, when retrieving /meta/any with all meta endpoints included,
it was failing because color was not recognised.
internal/router: allow top level meta endpoint list
Merge pull request #167 from rogpeppe/073-router-allow-top-level-meta-list

internal/router: allow top level meta endpoint list

We want to be able to find all meta endpoints without
necessarily inventing an entity id.
add CORS headers on archive endpoint
Merge pull request #164 from jrwren/v4

add CORS headers on archive endpoint

https://github.com/juju/charmstore/issues/146
reenable tests when ES disabled; remove ElasticSearchTestPackage
Merge pull request #171 from rogpeppe/075-reenable-tests

reenable tests when ES disabled; remove ElasticSearchTestPackage

Any package that was using ElasticSearchTestPackage would
have all its tests disabled when JUJU_TEST_ELASTICSEARCH=none.
This avoids that behaviour.