Move to new mongoose even-based api and add thread safe ipv4 resolution