* Under [wiki:TracModPython mod_python], you couldn't have multiple headers with the same name (e.g. `Set-Cookie`), which was the cause for #2843. That is now fixed by using `req.headers_out.add()` instead of dict-style assignment.
* Also under mod_python, when using a non-multithreaded MPM, the Trac environment wasn't being reused.
* Minor cleanup of session code.