Fix overflows in amrwbenc

Revert 3cdaed88daeeebfe05e7913837f41c2d92f411cc and
883ff4f4c41ae9bf84d1912ab054fe38f7505dd0, and fix the overflows that
should have been clamped instead of allowed to overflow.

Bug: 25843966
Bug: 23752600

Change-Id: I9af1726d058eb8eeaa80fa8df74fe0a3759486c1
4 files changed