Use CriticalSection with process_fast

Depends on https://github.com/dimagi/dimagi-utils/pull/202