check each WriteBlockResidualCavlc to avoid overflow
Merge pull request #1051 from ruil2/overflow_check

check each WriteBlockResidualCavlc to avoid overflow