Minimal changes to bring the resolver into the C++ era

It took surprisingly few changes, considering the leap from C with some
K&R constructs to C++17; most of the diffs are adding explicit pointer
casts and renaming variables called 'class' or 'try'.

As a result of building as C++, some of the names are now mangled,
making clashes with bionic harder. However, some names remain C due to
the __BEGIN_DECLS / __END_DECLS macros, scheduled to be removed in a
later cleanup pass.

Test: atest netd_integration_test

Change-Id: I3aefb9078421ec42f98f97d917785b365545feba
16 files changed