Added a class initialization test.

This tests for races during init, and correctness after an exception is
thrown partway through.

For bug 2655384.

Change-Id: I837ec435d1655e49b8b39f4129bd321857172870
6 files changed