shill: Add ArpGateway and network-based leases

Add two arguments to the DHCP client:
  - Turn on ArpGateway (ARP for default gateway in order to test validity
    of lease) by default, and use the same manager flag as flimflam did.

  - Use per-network lease files for Ethernet and WiFi.  This means that
    multiple leases can be held in parallel for different Ethernet devices
    and WiFi SSIDs.

Bonus changes: Fix DHCP lease filename template which was broken in flimflam
and ported with full fidelity to shill.  Make removal of old lease files
conditional on whether the lease file was non-default.

BUG=chromium-os:25717,chromium-os:16885
TEST=New unit tests + manual: Ensure dhcpcd runs with correct arguments ("-R"
added when ArpGateway is enabled on the manager, no "-R" otherwise), and that
the "set_arpgw" command in crosh works correctly.  Monitor dhcpcd command line
for new lease suffix parameter, and ensure that leases are being written out
to those files, and that the files are not being removed on program exit.
CQ-DEPEND=Iac282c1686695239a790bbcc0d110c6a69bf45e0

Change-Id: I68bb3cbd18c95f01003eaf049fa60aad446f8116
Reviewed-on: https://gerrit.chromium.org/gerrit/22065
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/dhcp_provider.cc b/dhcp_provider.cc
index 611fe51..e712378 100644
--- a/dhcp_provider.cc
+++ b/dhcp_provider.cc
@@ -47,10 +47,18 @@
 }
 
 DHCPConfigRefPtr DHCPProvider::CreateConfig(const string &device_name,
-                                            const string &host_name) {
+                                            const string &host_name,
+                                            const string &lease_file_suffix,
+                                            bool arp_gateway) {
   SLOG(DHCP, 2) << __func__ << " device: " << device_name;
-  return new DHCPConfig(
-      control_interface_, dispatcher_, this, device_name, host_name, glib_);
+  return new DHCPConfig(control_interface_,
+                        dispatcher_,
+                        this,
+                        device_name,
+                        host_name,
+                        lease_file_suffix,
+                        arp_gateway,
+                        glib_);
 }
 
 DHCPConfigRefPtr DHCPProvider::GetConfig(int pid) {