Ensure locking when mocking.
Ensure locking when mocking.

Summary:
Leaky Singleton's mocking function obtains the entry from the vault and proceeds
to modify it without locking the entry, which may race with any future use of
the singleton or the creation function.

Reviewed By: yfeldblum

Differential Revision: D34254633

fbshipit-source-id: c59db898b71b25d3026b903a0bfa40e3dbf9306f

facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly