Added index to async.map iterator
For loop helper variables (forloop.index, forloop.first etc) were not working due to relying on being passed an index from the iterator that did not exist.

Added index to the async.map function and added test cases to confirm fix.
Fixed for loop attributes (limit and offset)
The scan helper returned attribute arguments as an array, which the constructor function was not expecting.
The slice function also seemed more complicated than necessary and did not work with the limit attribute.
Remove unused sliceCollectionUsingEach