set connection pointer to NULL after disconnect so db_disconnect() is safe to call at any time