fix(session): session unavailable in shutdown functions

Shutdown functions defined in plugin can't access information in session
because this was already closed.

Because of the `register_shutdown_function('session_write_close');` the session was closed as one of the first shutdown functions. If a plugin wanted to get/set some information during a shutdown functions this was unavailable.

The shutdown function was registered (I think) because it needed access to `$CONFIG->dbprefix`, this was however also available by using `$this->db->getTablePrefix()`.

Now the session is available for all shutdown functions.

TODO:

* [x] Switch back to curly-brace notation instead of string-concatenation
* [ ] Add tests (if possible)