Use cons list in ksequence

Use cons list as the underlying data structure of KSequnce to enable efficient reuse of the tail.