nth depends on isinstance rather than __getslice__

testing for a __getslice__ attribute is faster but is not supported
by Python 3

Testing for isinstance(seq, collections.Sequence) is accurate but slow
(about 5 times slower than the current solution)

Testing for isinstance(seq, (tuple, list, collections.Sequence))
is accurate and fast in the common case.