Made MethodMessageHandlerInspector more thread-safe

When clearing a MethodMessageHandlerInspector, which happens in tests, it was
possible that another (simultaneous) call to getInstance() returned null.