Define a static User::terminate_database_connections method

Use from both user destructor and testsuite