Fix metadata break when any of the paratemers to the Format function are null
Merge pull request #799 from prasannavl/upstream

Fix metadata break when any of the paratemers to the Format function are null.
make shorter and more readable
Swagger service baseurl uses WebHostUrl if set

This allows SS responses to contain public facing base urls when behind a
reverse proxy.
Moved ToHttps to non-obsolete class

Backfilled unit tests for ToHttps method and fixed several defects
associated with it. It now only replaces http with https once and only at
the beginning of the line. Its also case insensitive.

Refactored Regex declarations to use the same PlatformRegexOptions
constant.
Prepend WebHostUrl to metadata urls if set

If the WebHostUrl config is set use that as the base url for metadata links, otherwise fallback to the previous functionality of using relative paths. This allows the metadata pages to work when behind a reverse proxy.
Fixed naming inconsistency in splitcamelcase regex
Make ServiceEndpointsMetadataConfig ctor private

Force people to use the static Create factory method to properly
initialize an instance and avoid silly errors.
Added OperationControl tests

This ensures that the OperationControl properly configures the metadata
link when the app host config has the WebHostUrl property set.
Changed test port from 8091 to 8093

The port 8091 is the standard port the Membase Management console listens
on. Although not necessarily relevant to all machines, seems plausible
others might run into this.
Fixed interacting new test

Test fixture was not properly destroying the apphost instance causing
subsequent tests to fail. Also the test was not resetting the WebHostUrl
config property.
Workaround race condition in failing test
Merge pull request #800 from sneal/use-webhosturl-if-provided

When set, use webhosturl for base url in swagger and metadata links