fb: refactor QuietHours code

thanks to ivisiblk for the idea

Change-Id: I56e2b4a1945a4b93251b9937b701c86168b732b4

Conflicts:
	services/java/com/android/server/BatteryService.java
	services/java/com/android/server/NotificationManagerService.java