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.

I don't like this mixin pattern. It feel gratuitous. I don't see why we are getting anything with this separation between CheckpointState and CheckpointStore. Can you explain the win there in the comment to these classes? What is the case against merged them into one trait: CheckpointStore?