shill: Assign "Default" status to the best connection

Set the highest-ranked connection to be the "Default".
As a result, the highest priority default route will
move with the highest-ranked connection in the service
list.

Bonus changes:
 * Service now formally holds a reference to the Connection
   object, so call a "SetConnection" method instead of a
   Create/Destroy of the HTTPProxy.
 * Actually start the routing table service, and do a couple
   minor fixes due to how the kernel actually accepts metric
   changes.

BUG=chromium-os:7607,chromium-os:23993
TEST=New Unit Test + Manual (watch routes while inserting
USB-Ethernet on a machine connected to WiFi)

Change-Id: Iddf1ed766238d9e8adc97bb54fc12b527f86239f
Reviewed-on: https://gerrit.chromium.org/gerrit/12685
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/mock_connection.h b/mock_connection.h
new file mode 100644
index 0000000..06f067f
--- /dev/null
+++ b/mock_connection.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2011 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_CONNECTION_H_
+#define SHILL_MOCK_CONNECTION_H_
+
+#include <base/basictypes.h>
+#include <gmock/gmock.h>
+
+#include "shill/connection.h"
+
+namespace shill {
+
+class MockConnection : public Connection {
+ public:
+  MockConnection(const DeviceInfo *device_info);
+  virtual ~MockConnection();
+
+  MOCK_METHOD1(UpdateFromIPConfig, void(const IPConfigRefPtr &config));
+  MOCK_METHOD1(SetIsDefault, void(bool is_default));
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MockConnection);
+};
+
+}  // namespace shill
+
+#endif  // SHILL_MOCK_CONNECTION_H_