Several robustness fixes and improvements

These changes address a few problems we've seen with Camo holding too many connections open, and it failing on valid URLs. I added better logging so we can debug any further issues that cause requests to fail.

(I would have broken this into multiple pull requests, but with such a small source file, they'd all conflict with each other on merge if they were separate.)