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

... for all classes.
I wrapped the call in a different method. I don't want to do a look up every time we call hflush. Doing that on initialization saves a bunch of reflection lookups. For the sake of keeping it a val, I wrapped the lookup in a different method, which is called at the time of initialization