Moved two WSGI-specific functions to the WSGI handler.

They were defined in base when the mod_python handler used them. See bfcecbff.
Refactored the unmangling of the WSGI environ.
Minor cleanup in the WSGI handler.
Fixed #20557 -- Properly decoded non-ASCII cookies on Python 3.

Thanks mitsuhiko for the report.

Non-ASCII values are supported. Non-ASCII keys still aren't, because the
current parser mangles them. That's another bug.
Merge branch 'master' into bug/20522