shill: cellular: Disable modem before system goes into suspend.

This CL changes the termination action in cellular code to disable the
modem, instead of simply disconnecting from network, before the system
goes into suspend mode. The modem is re-enabled, and conditionally
auto-connected back to network, after the system resumes from suspend
mode.

BUG=chromium:298403
TEST=Tested the following:
1. Build and run unit tests.
2. Run the following autotest tests with E362, E396, ALT3100, MU736:
   - network_3GSmokeTest
   - network_3GModemControl
   - network_MobileSuspendResume
3. Manually verify the following:
   - When auto-connect is enabled, suspend the system for 20s and then
     resume it. Verify from /var/log/net.log that the modem is disabled
     before the system goes into suspend mode, and re-enabled and
     reconnected to network after the system is resumed.
   - When auto-connect is disabled, suspend the system for 20s and then
     resume it. Verify from /var/log/net.log that the modem is disabled
     before the system goes into suspend mode, and re-enabled but not
     reconnected to network after the system is resumed.

Change-Id: Id60eb7bc25b6484c13f28331062d7b67c726a0ad
Reviewed-on: https://chromium-review.googlesource.com/171374
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
diff --git a/manager.h b/manager.h
index 6ec7827..6d07dec 100644
--- a/manager.h
+++ b/manager.h
@@ -387,7 +387,9 @@
   friend class WiFiObjectTest;
   friend class WiMaxProviderTest;
 
-  FRIEND_TEST_ALL_PREFIXES(CellularTest, ConnectAddsTerminationAction);
+  FRIEND_TEST(CellularCapabilityUniversalMainTest, TerminationAction);
+  FRIEND_TEST(CellularCapabilityUniversalMainTest,
+              TerminationActionRemovedByStopModem);
   FRIEND_TEST(CellularTest, LinkEventWontDestroyService);
   FRIEND_TEST(ManagerTest, AvailableTechnologies);
   FRIEND_TEST(ManagerTest, ConnectedTechnologies);