split from https://webrtc-codereview.appspot.com/37029004/ This is based on clean up code change at https://webrtc-codereview.appspot.com/37129004 BUG=4145 R=perkj@webrtc.org, pthatcher@webrtc.org, stefan@webrtc.org, tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/39799004 Cr-Commit-Position: refs/heads/master@{#8337} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8337 4adac7df-926f-26a2-2b94-8c16560cd09d