SGSparseVector: fixed invalid reads in sort_features() and introduce clone() method + unit test