Revert^2 "Fix race in CommitCodeInternal and cleanup"

This reverts commit 8dde74eb7bec8e989f34d86a01c26b0f5c7e6443.

We were failing to do a null check in cha.cc. Due to compiler
optimizations this would actually run without error on non-asan
builds, causing the error to pass testing.

Reason for revert: Fixed issue causing asan issue.
Test: run asan tests

Change-Id: Ic5492c69b7735555108d8b18c8e687ce510c4549
5 files changed