Make request permissions dialog layout robost

If the min width of a dialog changes in portrait vs landscape
it was possible that a part of the request permissions dialog
is chopped off. The custom content layout manager was using a
fixed width and changing orientation may lead to a dialog
width lesser than the fixed width of the layout manager.

Another problem was that if the above occurs and the window
width changes then the window may not be tall enough to fit
the content. To address this we have to do a gross move and
re-add the window to the window manager, so it can be resized.

Another issue was that if the "Don't ask again" checkbox is
shown not for the first but say the second permission request
(in the case of multi-permission request in one API call) the
content was chopped off as the height measurement for how much
the content needs to be was restricted by the parent measure
spec. Now we measure with no restrictions to accommodate the
whole content.

The way reqeust permissions dialog is implemented is problematic
as it is a dialog styled activity which means we may need to
resize its window. It is better to implement it as a fullscreen
activity that has a custom content layout mangar that makes
the content look like a dialog. Since this is risky at this
point we do targeted fixes to address the above issues.

bug:24679384

Change-Id: If51a360ba17dfb71b66dcf841ea47c17606eba27
3 files changed