Fix bugs in PersistenceWindowPool

- Make it resilient against very small store size and memory size
  configurations.
- Make `allocateNewWindow` give up if it cannot map a BrickElement reasonably
  quickly.
Merge pull request #2278 from chrisvest/1.9-persistence-window-pool-of-love

Fix bugs in PersistenceWindowPool