move the persistent layer into a separate library project so that
account and sync project can also depend on it