Set second ref frame to be NONE in key frame coding

This commit explicitly set the second reference frame type to be
NONE in key frame coding mode. This fixes a subtle dependency of
reference motion vector used by next inter frame on mode_info
reset before key frame coding.

Change-Id: I5ff0359753fdc9992b0bfe889490f7a32d7d5f6a
Remove reset mode_info array per frame

The mode_info array was unnecessarily reset to zero every frame
when error resilient mode turned on, given that the mode info
values per block will be assigned during mode search stage.

This commit removes this reset operation. It reduces the runtime
cost on memset operation to 1/3. The overall speed -6 runtime is
reduced by 2%.

Change-Id: I32ecb73338d8995cc0c5147de09357364f13d45b
Use bit_depth in VP9Common as the flag of highbit.

Change-Id: I881aefbe68f9c10bb4629a2a5ee1e42a225d5ab7
Improve the libvpx encoder test driver

The encoder initialization is called in EncodeFrame(). Therefore,
in the unit tests, the set control is done when video->frame() is 1.
This didn't cause problem since current tests mainly test lag_frame
> 0 case, or no encoding option that needs to allocate memory before
1st frame is used. If use lag_frame = 0 and encoding multiple tiles,
the unit tests crash. The issue is fixed by doing the initialization
before encoding frames.

Change-Id: I43102048f88448bcf27e9c60e0ec06c176b02e5c
Merge "Set second ref frame to be NONE in key frame coding"
Merge "Remove reset mode_info array per frame"
Merge "Use bit_depth in VP9Common as the flag of highbit."
Merge "Improve the libvpx encoder test driver"