Added Task class

A Task object contains all the information related to the Task. The idea is to pass this Task object (along with the Array $args) to the workers so they can save intermediate results.