Make monkeypatch url_scheme arg optional
Move/expose testutils like UnixSocketServerThread
Tweak monkeypatch code