Move the database connection outside hook_queue

Move the database connection outside hook_queue, so we don't create a new connection to mongo for every email.