Close SQLite cursors, otherwise SQLite behaves creatively
Fix NickServ reconnection bug