Camera2: Protect MarshalRegistry against concurrent access

Multiple CameraMetadataNative objects could be reading and writing
to the metadata marshaler registry simultaneously.

This can lead to an infinite loop in the HashMap in the worst case,
so add synchronization against this.

Bug: 29043079
Change-Id: Ic5e9e58a9333b99b4bea87bf790c9fbfadfbbea9
1 file changed