Move event_base_new out of critical region