Use cons list in ksequence

Use cons list as the underlying data structure of KSequnce to enable efficient reuse of the tail.

Achevied 3~6x speedup on related operations of KSequence, but only slight overall performance improvement (< 10%) because this is not yet the bottleneck.