Add proxy testing

We can use [mitmproxy](http://mitmproxy.org/) to test our proxy support. It's nice and self contained, plus it's scriptable. Requires Python, but I can deal with that (and Travis has it built-in).

Supersedes the remaining issues from #70 and #72.