Make pip size spec calculations more precise

Improve the procision of the new pip size spec calculations
by making sure we are as close to the requested aspect ratio
as possible.
Also make sure to use rounding instead of casting to integer.

Update the PipSizeSpecHandlerTest to reflect the changes as well.

Bug: 283500710
Test: atest WMShellUnitTests:PipSizeSpecHandlerTest
Test: atest PinnedStackTests
Change-Id: Iec0f9df11720584de46c839f5b30559bd8d22222
2 files changed