[6.0][Concurrency] Refine getResumeFunctionForLogging to avoid reading invalid future contexts.
When using a future adapter, the resume context may not be valid after the task starts running. Only peer through the adapter when we're starting to run.
rdar://126298035
(cherry picked from commit 0f226b6667cf5191409416f4798396098f3b84a4)