Cleanup loaded features and constants after dependency tests.
Merge pull request #15956 from zuhao/refactor_activesupport_dependencies_test

Cleanup loaded features and constants after dependency tests.