Fixes #3601: Use secure websockets if available

This will need testing since I haven't tried with certificates yet. It
would also be nice to have a PR in puppet-foreman to use the same keys
as apache.
Since we have the option in the UI now, this should be handled by ```Setting``` too, otherwise the proxy will not take care of the options there.