Tests and docs for PersistenceHelper

This also moves the manager patching from `PersistenceHelper.__init__()` to `PersistenceHelper.setup()` which is a better place for it.