[Media Router] Revise capture resolution selection algorithm.

This CL does a few things.
1. Use physical pixel dimensions as the input to the max resolution algorithm.
2. Accounts for portrait mode tablets/convertibles by converting dimensions to
   landscape mode.
3. Simplifies the max resolution selection algorithm to find the maximum 16:9
   capture resolution that downscales the longer dimension of the screen
   dimensions, constrained below by the minimum capture dimensions and above by
   1920x1080 (as capture-beyond-full-HD is uncharted territory).

This also adds several test cases for the max resolution setting algorithm.

PiperOrigin-RevId: 250015772
2 files changed