Make elasticsearch_url not a global function.

Now a proper angular service, which is cool.
TODO: Calculate the ES URI once only (outside factory) and return a simple string?