Make Remove() atomic, as expected

Backport of go/aog/651880

It appears that the non-atomicity of Remove() can, with just the right
timing, cause heap corruption.

Bug: 31023171
Bug: 77291921

Change-Id: I0d9a4b19f1b307d98f01ec76a47e4748f713437c
Merged-In: I0d9a4b19f1b307d98f01ec76a47e4748f713437c

Test: Build and boot sailfish.
1 file changed