Fix handling of continuations for captured context
Fix handling of continuations for captured context

My recent delegate optimization for async methods introduced a race condition that breaks posting back to a captured context.  If the awaited task completes between the time we check IsCompleted and when we try to store the continuation into the Task, we need to queue the continuation for execution, but my change incorrectly queued it to the thread pool rather than to the captured context.

rartemev/coreclr,poizan42/coreclr,mmitche/coreclr,wateret/coreclr,parjong/coreclr,rartemev/coreclr,JosephTremoulet/coreclr,poizan42/coreclr,ruben-ayrapetyan/coreclr,cshung/coreclr,ruben-ayrapetyan/coreclr,parjong/coreclr,poizan42/coreclr,cshung/coreclr,wateret/coreclr,cshung/coreclr,parjong/coreclr,poizan42/coreclr,yizhang82/coreclr,rartemev/coreclr,mmitche/coreclr,yizhang82/coreclr,hseok-oh/coreclr,mmitche/coreclr,cshung/coreclr,JosephTremoulet/coreclr,yizhang82/coreclr,hseok-oh/coreclr,wtgodbe/coreclr,wateret/coreclr,hseok-oh/coreclr,yizhang82/coreclr,krk/coreclr,krk/coreclr,yizhang82/coreclr,ruben-ayrapetyan/coreclr,JosephTremoulet/coreclr,mmitche/coreclr,JosephTremoulet/coreclr,parjong/coreclr,krk/coreclr,JosephTremoulet/coreclr,mmitche/coreclr,wtgodbe/coreclr,krk/coreclr,wateret/coreclr,rartemev/coreclr,cshung/coreclr,JosephTremoulet/coreclr,krk/coreclr,hseok-oh/coreclr,ruben-ayrapetyan/coreclr,hseok-oh/coreclr,rartemev/coreclr,krk/coreclr,ruben-ayrapetyan/coreclr,hseok-oh/coreclr,wateret/coreclr,wateret/coreclr,rartemev/coreclr,parjong/coreclr,wtgodbe/coreclr,mmitche/coreclr,poizan42/coreclr,wtgodbe/coreclr,poizan42/coreclr,ruben-ayrapetyan/coreclr,cshung/coreclr,parjong/coreclr,yizhang82/coreclr,wtgodbe/coreclr,wtgodbe/coreclr