Fix a race in PersistenceWindowPool related code.

This closes a race window where a thread could mistakenly acquire a closed window from the PersistenceWindowPool.
When this happened, the bug would manifest itself as an "illegal position" exception from the getOffsettedBuffer call.
Merge pull request #2303 from chrisvest/1.9-mapped-buffer-race

Fix a race in PersistenceWindowPool related code.