Add cares into the event loop

* Fix DNS query callbacks as they were not handled by event loop