A few fixes to avoid crash in HW codec on device orientation change.
A few fixes to avoid crash in HW codec on device orientation change.

- Fix video encoder Reset() function to avoid setting codec
resolution to zero.
- Follow SW codec implementation and do not crash when frame
with the resolution different from the encoder resolution arrives.
Instead wait for at least 3 frames with new resolution and
re-initialize the codec. HW codec reset may take much longer
than SW codec, so these 3 frames threshold avoids resetting
codec when outstanding camera frame captured from previous device
orientation arrives.
- Plus some minor changes to make encoder reset/release
implementation closer to decoder implementation.

BUG=
R=tkchin@webrtc.org

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

Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 0b435ba597eeb608a69e33c889d15dce55e5d1ea

sippet/talk,sippet/talk,sippet/talk,sippet/talk,sippet/talk