Don't let the ThreadPlanSingleStepTimeout interrupt an already stopped process (#227898)
When the ThreadPlanSingleThreadTimeout timeout fires, first check
whether the process is stopped before sending the interrupt.
This is a simpler way to address the problem that was identified in:
https://github.com/llvm/llvm-project/pull/224272
The problem solved there is that if the stop processing is still going
on when the timer fires, we send the interrupt request event which gets
enqueued and then handled after the stop event processing has restarted
the inferior to continue the thread plan work.
That patch involved trying to figure out, when you receive the event,
whether it was stale or not. It was harder to reason about - and not all
the way right, though that probably could be fixed.
But when you get a stop event, we first set the private state to stopped
and then start the handling. So if instead we check whether the process
is stopped when the timer fires, and don't send the interrupt if it is,
we fix the same problem in a much more obviously correct way.
This addresses the flakiness of the test:
TestSingleThreadStepTimeout.py