make libcares optional

Had a couple of folks run into problems with this dependency, and it
isn't so critical that this needs to be a hard requirement.

Also handle being built against older versions of the library such
as those on Ubuntu 10.04.

Will likely need to evolve a nicer feature test system for the headers
to deal with this functionality not being present in the library.