Make sure the environment shutdown for the current thread is called after each request processing, even in case of errors.
This ensures that the db connection pool will get cleaned-up appropriately and that no permanent shortage of db connection can happen.
Closes #4465.
Authored by: cboos 2007-11-30
Parent: [r6260]
Child: [r6262]