Allow to cancel a proxy resolution request.

After calling GetProxiesForUrl(), there was no way to prevent the
proxy resolver from calling the passed callback once the response is
ready. This implies that the object passed in the callback (normally
as the "data" pointer) must be kept alive until the callback comes
back.

This patch allows to cancel an ongoing request and converts the passed
callback to a base::Callback instead of using a raw pointer.

Bug: 34178297
Test: Added unittests.
Change-Id: Ie544d0230fd0c2dc85c6b9eaca9b5b13702516fa
diff --git a/Android.mk b/Android.mk
index a18f754..eb192f0 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1077,6 +1077,7 @@
     payload_generator/tarjan_unittest.cc \
     payload_generator/topological_sort_unittest.cc \
     payload_generator/zip_unittest.cc \
+    proxy_resolver_unittest.cc \
     testrunner.cc
 ifeq ($(local_use_omaha),1)
 LOCAL_C_INCLUDES += \