Fix HTTPServerRequest.fullURL to include the port if necessary and to use the right protocol when behind a proxy. See #365.
Set the X-Forwarded-Proto header in the HTTP reverse proxy.
A few code style changes and rephrasing + let RNGs derive from a common RandomNumberStream interface.