[VM] Ensure a class is type finalized before finalizing it.
[VM] Ensure a class is type finalized before finalizing it.

Fix for https://github.com/dart-lang/sdk/issues/36486

Change-Id: Ic04bb71c3bebfa2cf02c02d419b82d2a0e5ed6fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99206
Reviewed-by: Alexander Markov <239e774fd29abc1267878f57afe1a8a03e0ca887@google.com>
Commit-Queue: Siva Annamalai <2e618a8cbd7bb6b3d4409061ae407d692a098546@google.com>

dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk