fix(web-server): #581 HTTPS Support for Karma Proxy

Add tests to validate configuration settings are properly handled and
refactor one-time certificate handling a little to make it easier to
test.

Closes #581