Add support for an advanced task scheduler managed by the application.

It might be prudent to always set this to 0, even if the scheduler object is unavailable.  That way the check for `active` in the `run` function won't be incorrect after a call to `clearAsyncTasks_`