Update to work with ES6 generators and node.js

* updates `runScheduledTask` to work with the updated iteration protocol
* remove obsolete `TaskResult`
* add `setImmediate` enqueue
* automatically choose which enqueue to use
* compatibility with node's module system
Add package.json