shill: support 3G dongles with PPP interface

Assuming the 3G dongle has been switched to modem mode (with
usb_modeswitch or similar), and an activated SIM is present,
shill will automatically connect to the cellular network.

The primary change, as far as the Cellular/Modem logic goes,
is that we take the absence of a link name to mean that the
modem is a PPP dongle. Instead of bailing out, we create the
Cellular object, and register it with the manager as any other
Cellular device.

When the Cellular connection is complete, CellularCapabilityUniversal
checks the Bearer's IPConfig method, as indicated by modemmanager1.
If the method is specified as PPP, the capability asks the Cellular
device to start PPP.

When PPP setup completes, Cellular passes the IP configuration
information to the PPPDevice. At that point, the PPPDevice is
assigned an IP address, and routing is updated appropriately.

Notable changes:
- Moved VPN to VirtualDevice, changed OpenVPNDriver to use it,
  created a new subclass PPPDevice.
- Moved PPP code out of L2TPIPSecDriver, and into PPPDevice.
- Changed L2TPIPSecDriver to use PPPDevice.

While there:
- Got rid of VPNDriver::OnDisconnected, and changed callers to
  use DropConnection instead.
- Made Load and Save of VirtualDevices no-ops. This eliminates
  the confusingly named "device_" stanzas in the default profile.
  We lose VPN byte counts by doing this, but they weren't sensible
  anyway (they'd be shared across potentially different VPNs).

New units will follow in another CL (TBW).

BUG=chromium:240051
TEST=unit tests, manual

Manual testing
--------------
1. Get 3G PPP dongle.
2. Install activated SIM.
3. Plug dongle into USB port.
4. Wait for the dongle to switch to modem mode.
   (I used a manually installed usb_modeswitch, but this will
   soon be handled by mist.)
5. Wait for the dongle to connect. With the Huawei E303, this
   takes about 35 seconds.

Change-Id: I916bef451ee6e8dcf1af8135ecf6787251acf19b
Reviewed-on: https://gerrit.chromium.org/gerrit/51356
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
diff --git a/mock_virtual_device.h b/mock_virtual_device.h
new file mode 100644
index 0000000..fe1c874
--- /dev/null
+++ b/mock_virtual_device.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SHILL_MOCK_VIRTUAL_DEVICE_H_
+#define SHILL_MOCK_VIRTUAL_DEVICE_H_
+
+#include <gmock/gmock.h>
+
+#include "shill/virtual_device.h"
+
+namespace shill {
+
+class MockVirtualDevice : public VirtualDevice {
+ public:
+  MockVirtualDevice(ControlInterface *control,
+                    EventDispatcher *dispatcher,
+                    Metrics *metrics,
+                    Manager *manager,
+                    const std::string &link_name,
+                    int interface_index,
+                    Technology::Identifier technology);
+  virtual ~MockVirtualDevice();
+
+  MOCK_METHOD2(Stop,
+               void(Error *error, const EnabledStateChangedCallback &callback));
+  MOCK_METHOD1(UpdateIPConfig,
+               void(const IPConfig::Properties &properties));
+  MOCK_METHOD0(DropConnection, void());
+  MOCK_METHOD1(SetEnabled, void(bool));
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MockVirtualDevice);
+};
+
+}  // namespace shill
+
+#endif  // SHILL_MOCK_VIRTUAL_DEVICE_H_