Improvements to handling deep data

1. DeepData -- add helper function channel_ptr() and deep_value(). This helps make other places that access the DeepData do so consistently, it's so very error-prone to mix up indexing of channels versus samples, or getting the pointer arithmetic or type conversion wrong.

2. Fix bugs in ImageBufAlgo::flatten() (and therefore in 'oiiotool --flatten'): The main problem was that IBA::flatten was written assuming that alpha values were "cumulative", but in fact they are "local". Also, we didn't properly distinguish between the alpha & color channels that are "premultiplied" values, versus the Z channels which are by definition not multiplied by alpha.