Implement a sequenceEqual method for comparing two sequences

Compares two sequences, with an optional comparator.