[feature/session-storage] Combine map queries into function

The map queries all have a similar sql query pattern.
Combine all of these patterns into a function eliminates
code duplication

PHPBB3-9733
[feature/session-storage] Eliminate duplicate query code

Changed native session storage to use the class
query function to eliminate code duplication.

PHPBB3-9733