Instrument class code with a boolean array field.
Zero element of this array is used as a flag for class registration for the current running test.
Initially the flag is false, then during execution com.intellij.rt.coverage.data.ProjectData#registerClassForTrace(java.lang.Object) is called.
When the registration is successful, the flag is set to true which means that there is no need to make registration calls.
When the current test is ended, the flag is set to false.
N.B. load and store of zero element should be volatile. It could be done with java.lang.invoke.VarHandle#[set|get]Volatile.
It is available only with JDK9 which is incompatible with JDK5, so this method is not used for now.
If absent volatile semantic leads to errors, use com.intellij.rt.coverage.instrumentation.testTracking.TestTrackingClassDataMode instead.