function next(err) {
            if (err || i === len) {
                if (callback) {
                    callback(err);
                }
                return;
            }
            if (deferNext) {
                setTimeout(function () {
                    iterator(array[i++], next);
                }, 1);
            }
            else {
                iterator(array[i++], next);
            }
        }
Iterates an array in series.
@param {Array.<*>} array - Array to iterate.
@param {Function} iterator - Function to call for each element.
@param {Function} callback - Function to call when done, or on error.
@param {boolean} [deferNext=false] - Break synchronous each loop by calling next with a setTimeout of 1.