Fixed issue in structural redefinition around class init

On non-x86 ISAs class initialization is two stage with a class first
being 'kInitialized' and later being 'kVisiblyInitialized'. This has
to do with the memory model of non-x86 ISAs. Because we did not follow
this process correctly we could hit check-failures on non-x86 targets
if the redefined class was not fully initialized when being redefined.

To fix this we force the class-linker to bring the initialization
state of the newly created class all the way to visibly initialized
before allowing the redefinition to take place.

Test: ./test.py --target
Bug: 134162467
Bug: 141236848
Change-Id: I466861270b957a0fe6a90bda0bdabece950f99b2
3 files changed