Start refactoring node state store, to make that pluggable too (to avoid one of BDB deps)