Redo 587688 and 592088 to add histograms in capturer

This change redoes
https://chromium-review.googlesource.com/587688
and
https://chromium-review.googlesource.com/592088

The above two changes added histograms in webrtc capturer implementations to
track the edge cases.

After change https://chromium-review.googlesource.com/c/617845, this change
should be safe to be merged into webrtc.

Bug: webrtc:8040, webrtc:8046
Change-Id: I28b9f26227a5a231c918969d8280ede91015dbe4
Reviewed-on: https://chromium-review.googlesource.com/615852
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Zijie He <zijiehe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#19437}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 565d046edcda84abb2f02473d7354bca902edd2f
3 files changed