Add more sanity checks to workaround the unidentified problem that CaptureThread is still running while related resouces are destroyed already.
Add more sanity checks to workaround the unidentified problem that CaptureThread is still running while related resouces are destroyed already.

BUG=
TEST=auto test
R=henrika@webrtc.org

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

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

svn2github/webrtc-Revision-8758,svn2github/webrtc-Revision-8758,svn2github/webrtc-Revision-8758,svn2github/webrtc-Revision-8758,svn2github/webrtc-Revision-8758,svn2github/webrtc-Revision-8758