phabricator: add support for using the vcr library to mock interactions
I'll use this in an upcoming test. The decorator dancing in this is
more complicated than I'd like, but it beats repeating all this code
everywhere.
Differential Revision: https://phab.mercurial-scm.org/D4600
keepalive: work around slight deficiency in vcr
VCR's response type doesn't define the will_close attribute. Let's
just have keepalive default to closing the socket if the will_close
attribute is missing.
Differential Revision: https://phab.mercurial-scm.org/D4599