std::vec: use a trait for the comparison function in .sort.

This provides static dispatch for a plain `a <= b` sort.