Allow customization and closing of HttpClient

Allow the use of a configured HttpClient.  Allow closing of http client.