Reland remaining bits of "Upconvert various types to int."

Most of commit cb180976dd0e9672cde4523d87b5f4857478b5e9 (which reverted
commit 83ad33a8aed1fb00e422b6abd33c3e8942821c24) was already re-landed.  This relands the rest, including modifications by kwiberg to hopefully avoid regressing performance.

In a subsequent change I will see if removing the int16_t cast in this modified version still causes perf problems.

BUG=499241
TEST=none
TBR=andrew

Review URL: https://codereview.webrtc.org/1181693005

Cr-Commit-Position: refs/heads/master@{#9487}
4 files changed