Several reference counting fixes

We love python-htpy :-) but we have been facing several problems when using it over python daemons or any way over long process runs. Even a simple "while True: cp=htpy.init()" can consume the available memory pretty quickly. The reason for this is that in seval points of the code the reference counters were not tracked or updated correctly. This patch fixes these problems.

This is joint work by me and Davide Canali (dcanali@lastline.com).
This strikes me as a good place to use a goto statement. As things stand now, the last thing to fail will be bubbled up to the user, not the first. This has nothing to do with your code but it is something someone(TM) should consider fixing at some point.