shill: Enable and disable IPv6 with interface events

Move device IP flag setting to a generic private method device.cc.
Use this to export the IPv6 address privacy flag setter.  Also use
this to enable and disable IPv6 at the same time that IPv4 address
configs are created and destroyed.  This will ensure that IPv6
kernel addrconfig starts and stops at the correct time.

BUG=chromium-os:23570
TEST=WiFiManager.050IPv6Basic: Passed during initial
connection, but failed due to some sort of DBus introspection
error in the second pass.  Manual: Monitor flags file for correct
operation on ethernet plug/unplug.  Manually verify the various
IPv6 addresses and routes being created and removed.

Change-Id: Id358b33dbf9faa602a181938ad524290b59a08b0
Reviewed-on: https://gerrit.chromium.org/gerrit/12577
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/mock_device.h b/mock_device.h
index 7a81659..462bc21 100644
--- a/mock_device.h
+++ b/mock_device.h
@@ -31,6 +31,9 @@
                      bool(const Technology::Identifier technology));
   MOCK_METHOD1(Load, bool(StoreInterface*));
   MOCK_METHOD1(Save, bool(StoreInterface*));
+  MOCK_METHOD0(DisableIPv6, void());
+  MOCK_METHOD0(EnableIPv6, void());
+  MOCK_METHOD0(EnableIPv6Privacy, void());
   MOCK_CONST_METHOD0(technology, Technology::Identifier());
 
  private: