Move most of the methods to a separate connection manager class. The
test case creates a manager to handle database creation, schema loading
and more. Most of the methods could be simplified because they can
access shared pdo, config and dbms data.
PHPBB3-10043
Two first simple tests to check functionality of session_begin and
session_create.
Added a mock class for the cache as well as a subclass of session
which has its cookie handling function mocked out to avoid header
sending problems.
PHPBB3-9732