Update summary in TimePreference change listener

Ensures the summary is updated even if we change the time preference
programatically; also allows other places to stop the summary from being
updated by setting a new listener.
Handle time comparisons using longs
Merge pull request #783 from SamWhited/quiet-hours

Update summary in TimePreference change listener