move shutdown_thread to MitmHttpProxy module