Fix the scheduler to better handle waking after sleeping/hibernating.

If the time to the next expected event is very old, we've probably
just woken up and need to rescan the recording list.

(cherry picked from commit 9d0b80b0430254df6c554afdfd480d0339a68492)