Improvements to iphb client wakeups and rtc time/alarm management

The rtc time is synchronized to system in two phases. First the rtc
time of day is brought within one second of system time. Then
sub-second timer is used to write rtc time of day again when system
time is just past full second. Effectively this should make rtc wakeup
alarms both more accurate (since the rtc is closer to system time) and
less frequent (since rtc should always be a bit behind system time and
thus the normal timers trigger before rtc alarms as long as the system
is not suspended).

Also while libiphb api still uses full seconds for wakeup ranges, they
are processed internally in us/ms accuracy. This should limit the odd
+/-1 second issues resulting from mixed use of system time, monotonic
clock and rtc time of day.

If libiphb clients request too wide mintime-maxtime range for the
wakeup, the mintime is moved closer to maxtime.

Also the client wakeups are done as late as possible, but if there are
external clients that must be woken up, all eligible clients are woken
up at the same time.

[iphb] Improvements to iphb client wakeups and rtc time/alarm management