fix double sumsegscan problem
add generic segscan and test refactor
some fixes to improve the performance of segscan
add performance test against thrust