Made isValidCallbackId threadsafe (Bug CB-7643)

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