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

... for all classes.