New digital gain handling
This certainly isn't ready for merging yet, but it might be worth starting to have a look at it.
The digital gain calculation is moved out of prepare() and into process().
The IPA classes are updated to fetch the digital gain from the delayed status, so we can no longer have the problem where prepare() gets skipped (at higher framerates) causing the image to "wink" with an old digital gain value.
There are still some things to think about.
For instance, the updating of the "actual" exposure/gain values when we write them to the sensor means we have to write them back to the metadata so that the correctly adjusted digital gain will be in the delayed status.
The split of platformPrepareIsp into platformPrepareIsp and platformPrepareAgc (the latter always being called, even when platformPrepareIsp is skipped).
Also the way I'm storing the AgcStatus from the switchMode so that I can use its values until the delayed status reappears, and probably other stuff too.
One little thing to note is that the digital gain reported in metadata doesn't get updated according to the minimum colour gain. That is, if the red colour gain was 0.8, the digital gain would previously have been reported as 1.25 (= 1 / 0.8). It was, in fact, always reporting the green gain. Now, however, it will report 1.0 (actually the lowest of the gains applied to any channel, in this case it will be the red rather than the green one). How do we feel about that?