closing db connections

Shutdown function fix for issue https://github.com/TheGamesDB/TheGamesDB/issues/54