Add locks around static use of CustomMarshal properties
Add locks around static use of CustomMarshal properties

* These locks shouldn't cover much work as generally the caches will
  quickly fill up and the inside-lock work will be quick.
* Also they shouldn't contend as it's quite rare for anything but the
  render thread to go through CustomMarshal.

Lssikkes/renderdoc,baldurk/renderdoc,cgmb/renderdoc,victor-moya/renderdoc,Yours3lf/renderdoc,TurtleRockStudios/renderdoc_public,Velro/renderdoc,etnlGD/renderdoc,googlestadia/renderdoc,Zorro666/renderdoc,victor-moya/renderdoc,moradin/renderdoc,Yours3lf/renderdoc,Zorro666/renderdoc,Anteru/renderdoc,TurtleRockStudios/renderdoc_public,Zorro666/renderdoc,Yours3lf/renderdoc,baldurk/renderdoc,etnlGD/renderdoc,cgmb/renderdoc,etnlGD/renderdoc,Velro/renderdoc,adrianbu/renderdoc,TurtleRockStudios/renderdoc_public,Zorro666/renderdoc,moradin/renderdoc,Lssikkes/renderdoc,baldurk/renderdoc,etnlGD/renderdoc,adrianbu/renderdoc,michaelrgb/renderdoc,Lssikkes/renderdoc,etnlGD/renderdoc,etnlGD/renderdoc,Yours3lf/renderdoc,adrianbu/renderdoc,Lssikkes/renderdoc,Anteru/renderdoc,moradin/renderdoc,googlestadia/renderdoc,baldurk/renderdoc,adrianbu/renderdoc,victor-moya/renderdoc,googlestadia/renderdoc,Zorro666/renderdoc,adrianbu/renderdoc,victor-moya/renderdoc,Velro/renderdoc,cgmb/renderdoc,moradin/renderdoc,Velro/renderdoc,cgmb/renderdoc,adrianbu/renderdoc,Lssikkes/renderdoc,Anteru/renderdoc,googlestadia/renderdoc,TurtleRockStudios/renderdoc_public,Velro/renderdoc,googlestadia/renderdoc,cgmb/renderdoc,victor-moya/renderdoc,michaelrgb/renderdoc,baldurk/renderdoc,victor-moya/renderdoc,Anteru/renderdoc,Yours3lf/renderdoc,michaelrgb/renderdoc,baldurk/renderdoc,Anteru/renderdoc,googlestadia/renderdoc,Velro/renderdoc,moradin/renderdoc,michaelrgb/renderdoc,Anteru/renderdoc,moradin/renderdoc,Anteru/renderdoc,TurtleRockStudios/renderdoc_public,Yours3lf/renderdoc,michaelrgb/renderdoc,TurtleRockStudios/renderdoc_public,Zorro666/renderdoc,Lssikkes/renderdoc