Link GCM heartbeat with wake on wifi preference

Currently, the GCM heartbeat manager schedules a timer that will always
wake up the system from suspend in order to send a heartbeat message.
This is bad for battery life if the user doesn't actually want to use
the wake on packet feature.  To deal with this problem:

- Add a new function, SetWakeFromSuspend, to the AlarmTimer class so
  that its wake from suspend ability can be changed on the fly.
- Drill a hole through GCM's beautiful abstraction layers so that we can
  get to the HeartbeatManager via the GCMDriver interface.
- Hook up the endpoint in the GCMDriver interface to
  WakeOnWifiManager::OnPreferenceChanged so that the wake from suspend
  property for all the GCM heartbeat timers is changed along with
  shill's settings.

BUG=397328, chrome-os-partner:34142

Review URL: https://codereview.chromium.org/745123002

Cr-Commit-Position: refs/heads/master@{#307151}
diff --git a/components/gcm_driver/gcm_client_impl.h b/components/gcm_driver/gcm_client_impl.h
index c27bb7b..ce87aad 100644
--- a/components/gcm_driver/gcm_client_impl.h
+++ b/components/gcm_driver/gcm_client_impl.h
@@ -108,6 +108,7 @@
   void UpdateAccountMapping(const AccountMapping& account_mapping) override;
   void RemoveAccountMapping(const std::string& account_id) override;
   void SetLastTokenFetchTime(const base::Time& time) override;
+  void UpdateHeartbeatTimer(scoped_ptr<base::Timer> timer) override;
 
   // GCMStatsRecorder::Delegate implemenation.
   void OnActivityRecorded() override;