database: added DBConnRef wrapper to manage calling reuseConnection()