Fixes issues with PersistenceRow being flushed more than once

PersistenceRow was not marked as clean when contents were flushed. This is now tested
 by unit tests and fixed.
Minor formatting fixes.
Makes PersistenceWindowPool.REFRESH_BRICK_COUNT package protected to be used by tests.