BUG: fix a segfault in fromiter()

This occurs in most Python versions except 2.7.
fromiter: add tests for a few more corner cases