Fix race condition in TransitionCollector.

There was a minor race condition that could happen if multiple
threads called TransitionCollector at the same time. Starting out
in CMS:

Thread 1: TransitionCollector(SS).
Thread 2: TransitionCollector(CMS) sees that it is already CMS so
has copying_transition == false. But then thread 2 changes to SS.
Thread 1 resumes but incorrectly doesn't check the
disable_moving_gc_count_ possibly resulting in errors if
disable_moving_gc_count_ != 0 due to JNI since we are going from
SS -> CMS and are goign to move objects.

Bug: 17189964

Change-Id: I4f0d002717516b81355d66f26e0e8ebe3958348d
1 file changed