refactor HDFS state and it's tests

Refactor HDFS state and it's tests. Add CheckpointState as the super trait of it.

This first refactoring attempt is not changing any behavior of the origin HDFSState. The intention is to separate out the super trait, CheckpointState.

Also refactored the tests to remove code duplication.

So I'm moving the checkPointStore to be a field of CheckpointState. I do not choose to eliminate the asdfa class by merging all the above methods to CheckPointState and making them abstract because I want a clearer separation of responsibilities. The logic is simply: you implement your own store for checkpointing and readCheckpointins and provide it to the CheckpointStateMachine and it will just work. Prefer composition over subclassing the CheckpointState and overriding a bunch of abstract method.