Added template support for for_each algorithm at client side (in algorithm.h)
Also added traits for segmented_vector_iterator.