When adding charms or bundles to mongo, index in ES if configured. Also, add EnsureID to ElasticSearch.
Merge pull request #134 from bac/update-es-on-doc-change

When adding charms or bundles to mongo, index in ES if configured.

Also add EnsureID to ElasticSearch.
Merge remote-tracking branch 'upstream/v4' into refresh-index

Conflicts:
	internal/charmstore/store_test.go
	internal/elasticsearch/elasticsearch.go
Added filters in queries
Formatted
address review comments

Type name "entity" as a constant; elasticsearch calls them types, hence
typeName.

Documentation and punctuation fixes

Add Order type for printf-less json marshaling.

Unexport storeElasticSearch.

Allow aliased names as well as raw names in query building.