Fix a deadlock in ViEEncoder::DeliverFrame.
Fix a deadlock in ViEEncoder::DeliverFrame.

The deadlock can happen when using HW encoder. HW encoder calls
the encode complete callback on libjingle worker thread instead
of ViECaptureThread. The capture thread can hold VieEncoder::|data_cs_|
and wait for ModuleRtpRtcpImpl::|critical_section_module_ptrs_|.
When libjingle worker thread runs encode complete callback, it
can hold ModuleRtpRtcpImpl::|critical_section_module_ptrs_| and
wait for VieEncoder::|data_cs_|.

|default_rtp_rtcp_| is not guarded by |data_cs|. So move it out of
the critical section to avoid the deadlock.

BUG=chromium:352567
TEST=Run apprtc loopback on CrOS.
Run apprtc between CrOS and Linux.
Run vie_auto_test.

R=henrik.lundin@webrtc.org, pbos@webrtc.org, stefan@webrtc.org

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

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

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