lavu/common: make FF_CEIL_RSHIFT faster when shift is constant.

See "[PATCH] lavfi/lut: use FF_CEIL_RSHIFT for chroma w/h rounding."
thread for more information.
avcodec/lcldec: Check that dimensions are a multiple of the subsample factors

Other dimensions would not work correctly currently,
also ask for a sample for files that fail this check.

This fixes an integer overflow leading to out of array
accesses.

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