RFC: make isempty(itr) work for general iterables

As mentioned in #5797, it would be nice if `isempty(itr)` worked for general iterable collections.   The patch to implement this is trivial, and I don't see a downside to this.