avutil/common: Fix integer overflow in av_clip_int8/16_c

Fixes: signal_sigsegv_30420a5_2388_cov_1489993561_integra_lavf.mp4

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
