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

Also add EnsureID to ElasticSearch.
It didn't need to be exported.  Changed to getID.