Remove "instanceof" checks in TargetInfo clients.

Clients of the various TargetInfo subclasses use runtime type checks
to dispatch different behavior depending on the target type. This CL
makes minimal changes to replace these checks with explicit methods
on the TargetInfo API to discourage clients from making inferences
based on the specific types (while we're refactoring this hierarchy).

The alternative provided here doesn't really improve the quality of
the existing code (because the new query methods don't convey any
application semantics other than the identity of the subtype like we
were already using; and because the clients still use the results of
these query methods to gate downcasting to the different concrete
types, so they still remain "as aware" of the subclass design as
ever). Arguably it even makes the code worse (because `instanceof`
is a language feature, while these new APIs are hypothetically more
prone to abuse that could result in unsafe downcasts). We expect to
continue addressing all of these issues in followup CLs, but it's hard
for maintainers to reason about the changes we can make as long as
these kinds of type-checks are spread throughout client code.

Once clients are generally only implemented in terms of the base
TargetInfo API, we may choose to retain the overall inheritance model
as an implementation convenience. Then the requirements of clients
who currently type-check and downcast for type-specific dispatch
would be better addressed either by moving their behavior into
polymorphic methods in the TargetInfo API, or else perhaps by some
sort of Visitor pattern that restructures the API while generally
leaving the clients responsible for any type-specific logic they
currently own. (Tentatively we might prefer an even simpler option
where all the subclass APIs are collapsed into the base TargetInfo,
and then there would be no need for "type-specific" behavior; more
info can be found at go/chooser-targetinfo-cleanup).

Test: atest IntentResolverUnitTests
Bug: 202167050
Change-Id: Ib3b3d7c4730a62243eb290a440bc0f14e4e31491
10 files changed