Can use host request headers if enable_host_header is set to true
in config file. If host header is not specified or host header is
turned off, it will use the default api_base_uri.
Also added unit tests.
Change-Id: Ia353c116485f3e7112bcfde11457cdf7fe006422
Closes-bug: 1446387