[XLA] Fix race condition in custom call partitioner registration.
[XLA] Fix race condition in custom call partitioner registration.

The custom call partitioner registration is not thread-safe. This can lead to a race condition when multiple threads try to register the same partitioner. This CL fixes the race condition by adding a mutex to protect the registration process.
