Fixes double-free and memory leaks at various levels of HTTP connection code. Mostly happens during failure processing - server errors, unstable connection, etc.