[tornado] refactor code to better support Future