FrameworkWebServer: Only serve stack traces to localhost

In case of an unhandled exception, stack traces should only be served
to users connecting from localhost, to prevent exposure of information
which could pose a security risk.

Requests not originating from a loopback address will be served a plain
HTTP 500 Internal Server Error page instead.