A port of parts of Python's itertools (and maybe stuff from more-itertools, etc.) to Swift