Clean up trellis code

Avoid code duplication in computation of DC delta rate in trellis
quantization for arithmetic coding
Refine rate estimation in trellis quant

Account for the more elaborate context modeling used for coding the DC
coefficient differences