[WIP][ticket/11731] Refactor session_table queries to use the session class

In order to be able to modify the underlying storage mechanism for session, other parts of phpBB that modify or query the session table have to be refactored to use session class instead.

PHPBB3-11771