Serve dir on an already-bound listener until stopped.
Split from serve so a caller that has to know the URL — a test whose
client connects to it — can bind first and read the address the listener
actually got, rather than guess which port bind settled on.