Camera2: Add distortion correction support

This allows camera devices to correct geometric distortion in their
optics, when requested by the application.

The correction only applies to processed (YUV, JPEG, etc) outputs,
not RAW buffers, or the result metadata.

Also fix metadata generation code to handle <clone> entries and their
hal_versions, to fix code generation for the HIDL layer. A clone entry
inherits its target entry's hal version, but can override it to a
higher version if necessary; an error is generated if the version is
less than the target entry. In addition, fix bug in generating HIDL
output when there are multiple new sections in a new HAL version.

Test: New CTS test passes
Bug: 74434422
Change-Id: I6154e9757310636565aec5344a8988408234c164
11 files changed