Fix a concurrency bug in page pinning in the buffer pool