Fixed some bugs in DbPersister. De-coupled DbPersistence and the connection pool