Restore or rewrite renegotiation-limiting code
In the 0.2.3 branch, we had some code to try to limit the number of renegotiations that could happen on a TLS connection (legacy/trac#4312 (moved)). This turned out to have a bunch of subtle bugs, so we reverted if (legacy/trac#4662 (moved)). We should re-do it as part of a general resource-limitation strategy in a later Tor.
The code as it stood is now in a branch called "reapply_4312" in my public repository. It contains cherry-picked versions of everything we reverted in legacy/trac#4662 (moved), plus the cherry-picked contents of George's "bug4626_callback_conditions_theory" branch.
Please assign tickets that got created because of bugs in the 4312 renegotiation code as children of this ticket.