Misc cleanup for class redefinition.

Added an iterator to access the RedefinitionData through and replaced
some code with scopes.

Bug: 31455788
Test: ./test/testrunner/testrunner.py --host -j40

Change-Id: Id7a381ac2b942b47d67619cd1da11858f8c9b41b
2 files changed