VideoTrackRecorder: Adding inner class H264Encoder

H264 Encoder using third_party OpenH264 library. This
CL adds a new class H264Encoder <is a> Encoder, where
on ToT, there is only VpxEncoder <is a> Encoder. The
new encoder is behing  #if BUILDFLAG(RTC_USE_H264).

Some code shifting from VpxEncoder to Encoder takes
place, in particular, some common functionality is
extracted from VpxEncoder into Encoder:

- StartFrameEncode() and set_paused() are extracted
and the latter is made thread safe, then renamed to
SetPaused()
- Members |main_task_runner_|, |origin_task_runner_|
and |encoding_thread_| are also extracted.

A few minor renames:
- ConfigureEncoding() --> ConfigureEncoderOnEncodingThread()
- CalculateFrameDuration() --> EstimateFrameDuration()

This is the 3rd step in a series of CLs to add support for
H264 to MediaRecorder (see https://crrev.com/1886123002/).
Next step is to MediaRecorderHandler and Blink support.

BUG=601636
TEST= see playground CL, also added unittest.

Review URL: https://codereview.chromium.org/1884383002

Cr-Commit-Position: refs/heads/master@{#388965}
6 files changed