Synchronize in BfPyramidPixelBuffer.isLockedByOthers

Comment from commit:

```
+            // In the general case in the server, sizes is created once
+            // for the entire OmeroContext and injected into each instance.
+            // Locking on it should come close to guaranteeing that only
+            // one server thread will be checking tryLock() at a time.
+            // This should prevent the infrequent but incorrect
+            // LockTimeout exceptions which can be seen by clients.
```