WebSession: fix for login-with-referer issue
- With the recent introduction of lazy saving of sessions, a memory leak was somehow introduced and subsequently solved. However it looks like there is some corner case in which the user session object is not released, and hence not saved. This commit introduces explicit saving of sessions upon concluding serving a request. Additionally removes the del special method of the session object, thus improving the possibility for Python garbage collector to be able to correctly delete the session from memory when no longer explicitly referenced.
- Removes never used support for session locks.
- In order not to confuse Browser, avoid creating duplicate (session) cookies, by just recording, for each cookie name, what is the last cookie the code would like to send to the user and by just sending this last one to the client.