Mostly revert 788bc510.  It's not needed and created a new bug.

That change was intended to fix a deadlock.  In reality, it only
worked around the deadlock and added a race condition that could cause
delayed handling of reschedule requests.  It was a series of later
changes that actually fixed the deadlocks, so this fix can be fixed by
reverting it.
Don't skip over recordings that are still tuning.

Fix a bug where the scheduler sometimes skips over recordings in the
rsTuning state.  This doesn't matter normally as the recording usually
transitiions to the rsRecording state quickly.  When there is a tuning
problem, however, this bug defeats the tuning timeout check in the
scheduler and the recording gets stuck in the tuning state.  This fix
makes sure the tuning check is always done.
Refactor timing/sleep handling in the scheduler.

The first main change is to use HandleRecordiing() and HandleTuning()
to set the sleep time.  The previous code used mostly duplicate code
in CalcTimeToNextHandleRecordingEvent().  That meant there were two
places that needed to be checked/kept in sync when analyzing/fixing
timing issues.

The next main change is to sleep as long as possible.  The previous
code would never sleep for longer than 60 seconds, even if it had
nothing to do.

The last main change is to be more persistent in tyring to apply long
preroll when the tuner is initially busy.  The previous code didn't
specifically try to do this and it was hit and miss whether or not
preroll was used in these situations.

The rest is various stylistic changes.

Fixes #11108