Add RecoveryMapMath tests; also some fixes.

Add thorough tests for recovery map math. Also, the following fixes for
issues discovered along the way:
  * Added proper scaling of luminances during map generation
  * Corrected some luminance and color conversions using incorrect
    luminance/luma cooeficients
  * Corrected PQ inverse OETF
  * Corrected clipping of gain when encoding recovery
  * Corrected sampleMap to use a better, working sampling algorithm
    instead of the previous bad and incorrect one
  * Clarified expected ranges in and out of some transformation
    functions
  * Clarified references for a bunch of transformations

Bug: 252835416
Test: builds, new tests pass
Change-Id: I3c2192e840b784774c60cf212aaf188501915340
5 files changed