test: cleanup http/autofree_connection (cherry picked from commit 70f69194eb3b19b5e41b52b17a820e1e91512560)