Refactor persistence to support in-memory storage

This is useful for testing.
add cpanfile.snapshot to .gitignore
put actual requirements in cpanfile