Block enclave entries in fork in SGX sim mode
Block enclave entries in fork in SGX sim mode

Currently fork() in SGX sim mode can happen while other enclave threads
are holding any locks either inside or outside the enclave. This causes
child process to hang in multithreaded cases if other threads are
holding locks while fork() happens. This change makes fork() wait till
all other threads are blocked and waiting for reentering the enclave,
and  then proceed to fork().
The similar mechanism is already applied to fork() SGX hardware mode.

PiperOrigin-RevId: 281191112
Change-Id: Ic4b55d95b078f38b5534539aa5990c4ec8ccdc52

google/asylo,google/asylo,google/asylo,google/asylo,google/asylo,google/asylo