dt_masks_legacy_params: protect against potential (impossible) "Dereference after null check"

Coverity CID 1227578
dt_dev_read_history(): cleanup handling of "orientation (off)" history element
temperature iop: process(): cleanup Bayer part
temperature iop: process(): cleanup X-Trans part
iop invert: process(): some generic cleanup
iop invert: process(): cleanup Bayer part
iop invert: process(): cleanup X-Trans part
Temperature iop: process(): (non-mosaiced): SSE
Invert iop: process(): (non-mosaiced): SSE
Invert iop: process(): (Bayer): SSE