test-webserver: check protocol and remote of the request
test-webserver: check protocol and remote of the request

In all cases here, we know which protocol CockpitWebRequest should be
telling us about.  That's mostly "http", except for cases where we test
with TLS enabled (and there, except for one case where we make sure we
are properly redirected when doing an HTTP request) or when "for TLS
proxy" support is enabled.

We also know where the request is coming from, as a function of
local_only, inet_only and cockpit_test_find_non_loopback_address() as
done from the setup() function.

Let's build out a general purpose mechanism for inspecting the request
object that we receive in the handlers, and use it to detect the correct
protocol type and remote address.

mvollmer/cockpit,cockpit-project/cockpit,mvollmer/cockpit,cockpit-project/cockpit,martinpitt/cockpit,mvollmer/cockpit,martinpitt/cockpit,mvollmer/cockpit,martinpitt/cockpit,martinpitt/cockpit,cockpit-project/cockpit,martinpitt/cockpit,mvollmer/cockpit,cockpit-project/cockpit,cockpit-project/cockpit