libopenjpegdec.c: Correctly scale gray16 output if precision < 16

Fixes ticket #2943.

Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Set bits_per_raw_sample when reading j2k frames.