fixes potential divide-by-zero error that could occur in restore_hue_dw3

When orig_chroma == 0, divide by zero could occur. Fix is to reorder the assignments to hue_factor and initialize it to zero. Then, only perform the offending division if orig_chroma != 0.