Refactor some loops and remove double iteration.
Refactor some loops and remove double iteration.

This CL is a minor refactoring to clean up and modernize some code
in webrtcvideoengine.

BUG=None

Review-Url: https://codereview.webrtc.org/3002213002
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#19660}

ShiftMediaProject/libilbc,ShiftMediaProject/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,ShiftMediaProject/libilbc,ShiftMediaProject/libilbc