fix InputStreamWrappers termination function logic

finished_function of InputStreamWrapper should return true
when there are no more elements, not the other way around.
changed this in both the has_next method as well as in the
default parameter in the constructor.