Refactored async resolver code flow

Fails on my machine. Consider
```
  while (data != 6) {
    poll_mgr(&mgr, 1);
  }
  ASSERT(data == 6);
```