We should talk about this more in January, or whenever works. I am leery of merging this code into the mainline at all. It's useful for experimenting, and we should definitely point researchers at it, but I worry that shipping Tor with a "dump all your keys" mode would send entirely the wrong message to our users and operators.
I looked at this patch a while ago, and had the same initial impression as nickm.
It looks like the patch is pretty modular overall, meaning it probably won't become a broken patch very quickly.
How about we change tor_tls_set_logged_address() so it takes a port argument, and then it dups "address:port" into the tls->address field rather than just "address"? That would decrease the size of the patch and increase its robustness to changes in the Tor code.
The next question is: where should we store the patch so researchers will actually find it? The 'research' page perhaps? But again, I'm not thrilled with having it in the first set of things people see when they think of Tor and research. :(