Revert "Revert "Prevent races with GC when transferring objects between threads""

This reverts commit e5179ce0ca8becf34ba6e7b2f3988874fe647c26.

Reason for revert: Fixed issues with:
  Checkpoint flag set without pending checkpoint in parent CL.

Bug: 67838964
Test: ./test.py --host -j50

Change-Id: I7622f9c18866b58ee3cbd9f4fe38a29b2cf84a88
8 files changed