Set version number in branch4.0 to 4.0.2.dev1
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).
Fix a regression in gzip output for StaticFileHandler.

Streaming static responses confused the gzip output transform since
it could no longer set the correct outgoing content-length.  Now
it will fall back to chunked encoding in this case.

Closes #1156.