move compilation, library & include checks to DefineBuildFlags.cmake
detect AI_ADDRCONFIG support => HAVE_THREADED_DNS (as it was)