replacing nextTick in cache with setImmediate coz of recursive restrictictions

For test cases with nested dns calls, was getting following warning
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.