re-work stale connection cleanup (fix handling for tornado 1.x)

There was a problem with connection close being called back directly which caused
the dictionary of connections to change while iterating.
Merge pull request #34 from jehiah/stream_closed_err_34

Error closing stale connections with tornado 1.x