Eliminated race and subsequent pattern error from Future#chooseAny.

There was a race condition where the latches were released
before the result was set. This meant that the pattern on
line 285 fails. The failed pattern match resulted in an
exception and an eventual deadlock.

Fixes #308.
Merge pull request #312 from markhibberd/future-fix

Eliminated race and subsequent pattern error from Future#chooseAny.