add seqNoForDate() helper method

calculating the correct sequence number is complicated by:

 * segment date overlapping
 * no monotonic guarantees
 * segment discontinuities
 * segments without an associated date

tests are included to cover all these cases
0.1.7