Add check for valid bit depth. (#977)
Add check for valid bit depth. (#977)

We add a function `CheckValidBitdepth` and use it for color channels and
for extra channels.

libjxl/libjxl,libjxl/libjxl,libjxl/libjxl,libjxl/libjxl,libjxl/libjxl,libjxl/libjxl,libjxl/libjxl,libjxl/libjxl