Tornado 4.0 compatablity

Backported old Task class for Tornado 4.0 compatablity. This
will hold until we migrate to new interface.

Should fix #75.