Use Tornado 3.x in tests.
Refactored tornado test cases.

Use an explicit IOLoop instance so it should be more clear what's going
on internally.
Merge pull request #287 from schlamar/refactor-tornado

Refactored tornado test cases.