avcodec/simple_idct_template: Fix several integer overflows