Ensure freeform windows always have a visible portion on screen

There was already code attempting to do this, but it wasn't
correct and was causing windows to pop to top or left.

This basically ensures that a fixed amount of dp in each
linear direction is visible on the screen for a given window.

Since this is handled in policy, it doesn't need to be enforced
during computeFrame anymore.

Bug: 123757388
Test: drag freeform to right or bottom,
      atest TaskRecordTests WindowFrameTests
Change-Id: I23c690a5efe06c77caa14ecc8e30a30cd42c23c4
3 files changed