added Sequence.persistent function (copy sequence in memory);
implementation is done by unrolled linked list (also used for Sequence.rev and Sequence.to_array);
should be quite efficient in time and memory