An iterative implementation of the recursive merge sort using stack.