[ticket/11590] Close database connections when tearDown() is called

PHPBB3-11590
Merge pull request #1466 from nickvergessen/ticket/11590

[ticket/11590] Close database connections when tearDown() is called