Remember and revert camera compat orientation change when camera closes

Also, revert rotation after the top activity stops being SCREEN_ORIENTATION_NOSENSOR and add a RotationReversionController to manage the reversion behaviour for camera compat, NOSENSOR and half-fold transitions.

Bug: 264186382
Bug: 267751289
Test: tested locally
Test: atest WmTests:DisplayRotationCompatPolicyTests
Test: atest WmTests:DisplayContentTests
Change-Id: I0033a5de7c4a7b886b241088577c32715ecccc57
8 files changed