Use uv_close callbacks to free watchers, timeouts, and connection loop

This is better than the previous solution. It ensures the uv requests are closed before freeing them, which was causing random memory errors. I also renamed some things for clarity.