CRM_Queue_Runner - Fix upgrade warnings. Extract disableBackgroundExecution().
This is a revision to #23775. As before, it prevents a hard error when
upgrading to 5.51. However, the try-catch produces confusing error messages
in the `CiviCRM.log.*` (ie they indicate a SQL error, but the situation is
actually a normal/expected during upgrade). This avoids the error messages.
Tested (`r-run`) with `civicrm/upgrade`, `drush civicrm-upgrade-db`, and `cv
upgrade:db` -- for both 5.45=>5.51 and 5.45=>5.49=>5.51.