asCoroutineDispatcher

Converts an instance of Scheduler to an implementation of CoroutineDispatcher.