Implementing bpo-30537: allow instances of types with an __index__ method in itertools.islice

Merged Yannick Jadoul requested to merge topic/py3.7/py3.7-bpo-30537 into branch/py3.7

Fixing test_islice in lib-python/3/test/test_itertools.py

See https://bugs.python.org/issue30537 and https://github.com/python/cpython/pull/1918

Merge request reports