Fix occasional ApiTest.DepartedRace failure due to GHOST_TXN_TARGET_ONCPU.
Fix occasional ApiTest.DepartedRace failure due to GHOST_TXN_TARGET_ONCPU.

third_party/ghost/lib/enclave.cc:617(2931) ERROR: unexpected state after
commit: GHOST_TXN_TARGET_ONCPU
PID 2931 Backtrace:
[0] 0x562b034ff4c5 : ghost::Exit()
[1] 0x562b034d1ea6 : ghost::LocalEnclave::CompleteRunRequest()
[2] 0x562b034b5a5d : ghost::(anonymous
namespace)::DepartedRaceAgent::AgentThread()
[3] 0x562b034c79cf : ghost::LocalAgent::ThreadBody()
[4] 0x562b034c82da : std::__u::__thread_proxy<>()
[5] 0x7fb162e1f7d9 : start_thread
[6] 0x7fb162d9969f : clone

Agent now checks whether the GHOST_SW_TASK_ONCPU bit is set in the
status_word
before attempting to schedule it on a cpu.

Tested: 1000 iterations of ApiTest.DepartedRace

google/ghost-userspace,google/ghost-userspace,google/ghost-userspace,google/ghost-userspace