bpo-31238: pydoc ServerThread.stop() now joins itself (#3151)

* bpo-31238: pydoc ServerThread.stop() now joins itself

ServerThread.stop() now joins itself to wait until
DocServer.serve_until_quit() completes and then explicitly sets
its docserver attribute to None to break a reference cycle.

* Add NEWS.d entry
2 files changed