Call the non-timed
Future#get() in a way that allows us to abort if it's expected to
hang forever. More precisely, if it's expected to return, we simply call it[*], but if it's
expected to hang (because one of the input futures that we know makes it up isn't done yet),
then we call it in a separate thread (using pseudoTimedGet). The result is that we wait as long
as necessary when the method is expected to return (at the cost of hanging forever if there is
a bug in the class under test) but that we time out fairly promptly when the method is expected
to hang (possibly too quickly, but too-quick failures should be very unlikely, given that we
used to bail after 20ms during the expected-successful tests, and there we saw a failure rate
of ~1/5000, meaning that the other thread's get() call nearly always completes within 20ms if
it's going to complete at all).
[*] To avoid hangs, I've disabled the in-thread calls. This makes the test take (very
roughly) 2.5s longer. (2.5s is also the maximum length of time we will wait for a timed get
that is expected to succeed; the fact that the numbers match is only a coincidence.) See the
comment below for how to restore the fast but hang-y version.