Track TaskSchedulers only when debugger attached
Today the base TaskScheduler ctor registers every created scheduler in a ConditionalWeakTable. This is then used in the internal TaskScheduler.GetTaskSchedulersForDebugger() to enable a debugger to find all of the schedulers that are active and then in turn find all tasks scheduled to them. However, for scenarios that involve creating many, many schedulers, this registration adds up to a non-trivial cost, both in time and space, and is only relevant for debugging. Plus, since this mechanism was introduced, Visual Studio has additional ways of tracking tasks for display in the Tasks window, e.g. ETW events.
This commit simply makes that registration more pay-for-play, only doing it if the debugger is attached at the time of the scheduler's creation.