Bug 498116 - Replace fixed check for updates scheduler with a fuzzy one

Checking the servers for update at a fixed time on fixed day of the week
can kneel the servers. However, activating automatic check for updates
on EPP packages is only possible by specifying a fix day and hour (see
bug 421779 for the decision).

This patch replace the fixed time of the day/week of the day way check
for updates are scheduled. Users can choose to check "once a day", "once
a week" or "once a month". The initial time used for next checks is the
time when the user activates the option. However, it never checks for
update exactly after a day, a week or a month. It introduces some
randomness:

- If the delay for checking for update is passed, it schedules a check
sometime in the next 8 hours.
- If the delay is well overpassed (see definition of "well overpassed"
below), it schedules a check in the next hour.

The delay is considered "well overpassed" depending on the recurrence of
the check:
- If the recurrence is "once a day", the delay is considered overpassed
after a day and 6 hours.
- If the recurrence is "once a week", the delay is considered overpassed
after a week and 2 days.
- If the recurrence is "once a month", the delay is considered
overpassed after a week and 6 days.

It also migrates automatically the fixed weekday/time preferences to the
new fuzzy scheduler.

Change-Id: I74a8bfba6b711e98eb795c1f924840e68789f102
Signed-off-by: Mikael Barbero <mikael@eclipse.org>
Signed-off-by: Pascal Rapicault <pascal@rapicorp.com>
12 files changed