This creates a struct that encapsulates the test server setup, and adds a shutdown method to clean up the thread when done.