Fix possible overflow while sorting CL segments for replay
patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-7992
merge from 2.0