Refactorings and data-race fixes for the standard PageCache
Merge pull request #2463 from chrisvest/2.2-future

Refactorings and data-race fixes for the standard PageCache
Added additional protection for IO exceptions when flushing pages.
Added check to ensure we don't re-pin with a cursor already using another page.