http.server: Factorize request handling even more
http.server: Factorize request handling even more

This splits even more parts of the request handling code into a separate
class. Doing so allows us to reuse this part of the code for tests (e.g.
mocks). Unlike before now the error handling can also be reused.

The patch became a bit more convoluted than intended, but the end result
is easier to read than the original code.

Signed-off-by: Michael Hanselmann <68b67885ff74281219b4a4be33cc20fd45078d7c@google.com>
Reviewed-by: René Nussbaumer <bc755ac45a0e799d1d490cba76febc56d80cc5fc@google.com>

grnet/snf-ganeti,ganeti/ganeti,yiannist/ganeti,bitemyapp/ganeti,andir/ganeti,leshchevds/ganeti,yiannist/ganeti,yiannist/ganeti,dimara/ganeti,ganeti/ganeti,ganeti-github-testing/ganeti-test-1,grnet/snf-ganeti,bitemyapp/ganeti,ganeti-github-testing/ganeti-test-1,onponomarev/ganeti,mbakke/ganeti,onponomarev/ganeti,apyrgio/snf-ganeti,leshchevds/ganeti,mbakke/ganeti,apyrgio/ganeti,andir/ganeti,ganeti/ganeti,andir/ganeti,dimara/ganeti,apyrgio/ganeti,leshchevds/ganeti,mbakke/ganeti,apyrgio/snf-ganeti