Extract ChooserGridAdapter.

As of ag/20463973 there's no major design changes required to lift
this out of being an inner class, and this combines with ag/20455546
to pull *most* UI considerations out of `ChooserActivity` (namely,
any that involve our "grid" except where those considerations are
bridged across the `ChooserGridAdapter.ChooserActivityDelegate`).

The testing changes were probably part of another CL that got included
here accidentally, but they're improvements we can go ahead with
anyways (switching some uses of mocks to real objects).

Test: atest IntentResolverUnitTests
Bug: 202167050
Change-Id: I4948bcd1fa58d4dbe44f7aef009db5f8864882de
9 files changed