Lock resources in event_posix.cc.
Lock resources in event_posix.cc.

Fixes errors reported by Helgrind from event_posix.cc when running video_engine_tests.

BUG=
TEST=helgrind,trybots
R=henrike@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2060004

git-svn-id: 03ae4fbe531b1eefc9d815f31e49022782c42458@4572 4adac7df-926f-26a2-2b94-8c16560cd09d

CyanogenMod/android_external_chromium_org_third_party_webrtc,sippet/webrtc,PersonifyInc/chromium_webrtc,bpsinc-native/src_third_party_webrtc,CyanogenMod/android_external_chromium_org_third_party_webrtc,jchavanton/webrtc,svn2github/webrtc-Revision-8758,SlimXperiments/external_chromium_org_third_party_webrtc,sippet/webrtc,krieger-od/webrtc,bpsinc-native/src_third_party_webrtc,sippet/webrtc,krieger-od/nwjs_chromium_webrtc,krieger-od/nwjs_chromium_webrtc,krieger-od/nwjs_chromium_webrtc,bpsinc-native/src_third_party_webrtc,jchavanton/webrtc,CyanogenMod/android_external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,SlimXperiments/external_chromium_org_third_party_webrtc,SlimXperiments/external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,AOSPU/external_chromium_org_third_party_webrtc,aleonliao/webrtc-trunk,CyanogenMod/android_external_chromium_org_third_party_webrtc,krieger-od/nwjs_chromium_webrtc,MIPS/external-chromium_org-third_party-webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,bpsinc-native/src_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,krieger-od/webrtc,krieger-od/webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,sippet/webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,CyanogenMod/android_external_chromium_org_third_party_webrtc,krieger-od/nwjs_chromium_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,MIPS/external-chromium_org-third_party-webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,sippet/webrtc,Alkalyne/webrtctrunk,Omegaphora/external_chromium_org_third_party_webrtc,krieger-od/webrtc,Omegaphora/external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,AOSPU/external_chromium_org_third_party_webrtc,PersonifyInc/chromium_webrtc,krieger-od/nwjs_chromium_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,krieger-od/webrtc,MIPS/external-chromium_org-third_party-webrtc,SlimXperiments/external_chromium_org_third_party_webrtc,aleonliao/webrtc-trunk,krieger-od/webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,svn2github/webrtc-Revision-8758,Alkalyne/webrtctrunk,Omegaphora/external_chromium_org_third_party_webrtc,jchavanton/webrtc,SlimXperiments/external_chromium_org_third_party_webrtc,PersonifyInc/chromium_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,AOSPU/external_chromium_org_third_party_webrtc,SlimXperiments/external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,PersonifyInc/chromium_webrtc,svn2github/webrtc-Revision-8758,jchavanton/webrtc,AOSPU/external_chromium_org_third_party_webrtc,AOSPU/external_chromium_org_third_party_webrtc,jchavanton/webrtc,sippet/webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,svn2github/webrtc-Revision-8758,xin3liang/platform_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,aleonliao/webrtc-trunk,aleonliao/webrtc-trunk,jgcaaprom/android_external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,MIPS/external-chromium_org-third_party-webrtc,jchavanton/webrtc,Alkalyne/webrtctrunk,aleonliao/webrtc-trunk,PersonifyInc/chromium_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,aleonliao/webrtc-trunk,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,SlimXperiments/external_chromium_org_third_party_webrtc,svn2github/webrtc-Revision-8758,xin3liang/platform_external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,MIPS/external-chromium_org-third_party-webrtc,svn2github/webrtc-Revision-8758,jchavanton/webrtc,CyanogenMod/android_external_chromium_org_third_party_webrtc,AOSPU/external_chromium_org_third_party_webrtc,Alkalyne/webrtctrunk,android-ia/platform_external_chromium_org_third_party_webrtc,PersonifyInc/chromium_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,AOSPU/external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,CyanogenMod/android_external_chromium_org_third_party_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,xin3liang/platform_external_chromium_org_third_party_webrtc