make isempty(itr) work for general iterables (as mentioned in #5797)
Merge pull request #5827 from stevengj/isempty

RFC: make isempty(itr) work for general iterables