shill: Convert DHCP Proxy to use a model similar to Supplicant and ModemManager.

Also, don't create a DBus connection for each proxy since this doesn't work in
some event callbacks and wastes resources. Instead use a shared connection
provided by the ProxyFactory.

BUG=chromium-os:17735
TEST=unit tests, tested on device

Change-Id: I4d16b430783c1159501c0414ef3b846bce1a4c0e
Reviewed-on: http://gerrit.chromium.org/gerrit/4279
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
diff --git a/dhcp_provider.cc b/dhcp_provider.cc
index ae67ed7..a2b3523 100644
--- a/dhcp_provider.cc
+++ b/dhcp_provider.cc
@@ -8,6 +8,7 @@
 
 #include "shill/dhcp_config.h"
 #include "shill/dhcpcd_proxy.h"
+#include "shill/proxy_factory.h"
 
 using std::string;
 
@@ -25,9 +26,10 @@
   return Singleton<DHCPProvider>::get();
 }
 
-void DHCPProvider::Init(DBus::Connection *connection, GLib *glib) {
+void DHCPProvider::Init(GLib *glib) {
   VLOG(2) << __func__;
-  listener_.reset(new DHCPCDListener(this, connection));
+  listener_.reset(
+      new DHCPCDListener(ProxyFactory::factory()->connection(), this));
   glib_ = glib;
 }