Fixes a race condition where frame_extra_infos_ is accessed from multiple threads by adding a lock. Adds thread safety idioms to the file to guard agains similar mistakes in the future. Bug: b/72979294 Change-Id: I0f2f947282a5b3414f1351e9e8e52ad523f7d2f6 Reviewed-on: https://webrtc-review.googlesource.com/48641 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Sami Kalliomäki <sakal@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21926}