Made isValidCallbackId threadsafe (Bug CB-7643)

_callbackIdPattern was being changed on multiple threads which caused bad access errors
[CB-7643](https://issues.apache.org/jira/browse/CB-7643)