This routine takes a synchronous non-throwing main actor isolated closure
without a result. If we are dynamically on the main actor, we just run the
closure synchronously. Otherwise, we run a new task on the main actor and call
the closure on that.
This builds on top of the previous commit by using
swift_task_isCurrentExecutorWithFlags in the implementation of this function.
To backwards deploy this function on Darwin, I used some tricks from libdispatch
to validate that we are on the main queue.