Add a new method to stop a TCP server, call it during cleanup of the
MockHTTP context. This solves a crash during pool cleanup.