Initial work on refactoring to use SebastianBergmann\GlobalState for
snapshotting global state.

An expected value in Framework_TestCaseTest::testStaticAttributesBackupPost() was changed to make this test pass after refactoring. While I really hate doing that it appears that the previous expected value was wrong, thus hiding a bug in the previous implementation.