Fix issue where multiple backups could occur after pause.
Fix issue where multiple backups could occur after pause.

Previously, the value of the LastRun field in the Schedule table was
updated to be (approximately) the time that the job was added to the
worker's list of tasks.  However, if the backup was missed (via pause or
system suspend), this value would be incorrect.  If the next scheduled
backup was also missed, then after the backup was finally run, the
computed next start time would be based on the (incorrect) last run time
of the first missed backup.  This would then immediately trigger an
unnecessary second backup.

Now, we add a handler to the StartingWork event to set a more accurate
value for the LastRun field in the Schedule table.

This fixes issue #2249.

duplicati/duplicati,duplicati/duplicati,mnaiman/duplicati,mnaiman/duplicati,duplicati/duplicati,duplicati/duplicati,duplicati/duplicati,mnaiman/duplicati,mnaiman/duplicati,mnaiman/duplicati