shill: Fix timer canceling

The move to new callback closures included the frequent replacement
 of "task_factory_.RevokeAll()" with
"weak_ptr_factory_.InvalidateWeakPtrs()".  The former canceled all
pending timers, whereas the latter also effectively canceled all
I/O callbacks.  This caused both portal detection and the service
proxy to stop working.

This CL creates CancelableClosures for the affected timers, and
cancels these closures instead of invalidating all weak pointers.

BUG=chromium-os:28885
TEST=Manual: Test both passing and failure cases of portal detection,
ensuring that DNS timeouts work correctly.  Use "curl -x" to test
HTTP proxy.

Change-Id: Id61dfb6a1a4ce0defaa08a99e318bc510c6c84b3
Reviewed-on: https://gerrit.chromium.org/gerrit/19644
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/http_proxy.h b/http_proxy.h
index 1a88d89..3303266 100644
--- a/http_proxy.h
+++ b/http_proxy.h
@@ -144,6 +144,7 @@
   int server_socket_;
   bool is_route_requested_;
   base::CancelableClosure idle_timeout_;
+  base::CancelableClosure transaction_timeout_;
   std::vector<std::string> client_headers_;
   std::string server_hostname_;
   ByteString client_data_;