Made TaskExtensions class internal.
Should specify the task scheduler here, otherwise TaskScheduler.Current may be used
Preserve StaceTrace.