Extract Environment utilities

This is a small pull request to extract some environment responsibilities from `TestResult`. My larger goal is to extract the test-running aspects of `TestResult`, in turn decoupling it from `PHPUnit_Framework_TestCase`. My goals are to

1. Improve code organization within the PHPUnit core by making `TestResult` test suite agnostic.
2. Allow test writers to use any implementation of the interface `PHPUnit_Framework_Test` without needing to implement a custom test runner.