Implement user-settable power save whitelist.

The whitelist is now maintained by DeviceIdleController,
which is moving out into its own independent system service.
Network stats now queries it for the whitelist, instead of
collecting that itself.

Also did a few improvements in alarm manager -- made the
code for moving alarms out of the pending list more robust,
and fixed the debug output to always print the contents of
the pending list even if we aren't in a pending state.  (That
would have helped me identify the problem much earlier.)

Change-Id: I0f7119d4c553c3af4d77b2f71246fa6e2c13c561
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 45c078d..942e6a6 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -79,6 +79,8 @@
 
     <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGED" />
     <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGING" />
+    <protected-broadcast android:name="android.os.action.DEVICE_IDLE_MODE_CHANGED" />
+    <protected-broadcast android:name="android.os.action.POWER_SAVE_WHITELIST_CHANGED" />
 
     <protected-broadcast android:name="android.os.action.SCREEN_BRIGHTNESS_BOOST_CHANGED" />