Test for metric properties.

Actually triangle inequality is not respected (even though random tests
may succeed sometimes).