Clean up cancelled timeout handles when the queue gets full of them.

Based on a patch by Giampaolo Radola:
https://github.com/facebook/tornado/issues/408

Closes #408.