hevc: cabac: optimize initial state computation

This is the same optimization than in h264_cabac.c
hevc: make high bit depth support more sane

- Don't try to support different bit depths for luma and chroma
- generate one function per bit depth supported for templated functions
hevc: add missing clip in transform_skip
hevc: optimize transform_skip
hevc: make dequant a templated function
hevc: use ptrdiff_t for all strides
hevc: avoid uninitialized array access
hevc: fix DC prediction for high bit depths