Fix the way we decide if hasNext is true or not in WALReader. Unit tests...

... for all classes.
I would wrap this method in hflush stuff as a function from cleanliness, so that we dont have to do `hflushMethod.foreach` , just call `flush()`