Move more functionality to the abstract test case

This functionality can then be removed from the NginxTestCase that is currently being worked on.