Meta dist

This changes the distance policy implementation.
Some code duplication is removed.
Dot is computed with std function.
Some cpp tests are added for cartesian distance.
good idea!  But I would use v1.begin() and v1.end().