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

Since this code has to handle both scheduled tasks and timeouts (which can be run during a scheduler to satisfy the delay), I want a more generic name.

I changed this to clearAsyncTasks_ instead to be a bit more meaningful.