Distributed vector cleanup

This cleans up the implementation of distributed vector. Iteration is now much more performant.
what's wrong with pos.empty()?