Add close() method to close underlying websocket server to assist with writing test cases.