Fix #689: sporadic errors could be written out at shutdown by the Dispatcher finalizer
Backport weakref.finalize() and use that, instead of a custom deallocation hook in _dispatcher.c
Merge pull request #694 from pitrou/fix689

Fix #689: sporadic errors could be written out at shutdown by the Dispat...