Fix a regression in which a timeout could fire after being cancelled.

Closes #1148.
Fixed support for test generators

This fixes the problem that AsyncTestCase no longer seemed to work with test generators (as supported by Nose, http://nose.readthedocs.org/en/latest/writing_tests.html#test-generators).
Merge pull request #1153 from nwilbert/patch-1

Fixed support for test generators