This is essentially a port of what wsgirequest.init was doing
inline via cgi.parse().
Our version is better because - unlike cgi.parse() - we keep the
query string and POST data separate. We do still expose a unified
dict for convenience, however. But consumers can now be explicit
about whether a parameter should be fetched from the query string
or form data.
Because we can only read from POST data once, we had to support
passing in previously resolved values to support hgwebdir's ugly
hack of having to construct a new parsedrequest type.
The only consumer we update to use the new API is wsgirequest.
Also, the normalization of values is explicitly not performed in
the new code. This is because the intent of our request object is
to represent the raw request with minimal transformation.
With this commit, all meaningful request components are now
reflected on our parsedrequest type!