this is a port of caolan's Async.js lib into lua