Refactor AstropyTest to make it easier to subclass.

Split out most of run() into different methods so that you can override the calling signature without rewriting all the bolierplate code.
`construct_testing_command` -> `generate_test_command`