Add CrossProfileAppsInternal#getTargetUserProfiles

This will be used by the logic that updates the app bucket state of
cross-profile connected apps that declare the crossProfile manifest
attribute.

Also makes the following changes:
- Fixes CrossProfileAppsServiceImplRoboTest by registering the local
service in a different way.
- Removes some code duplication in CrossProfileAppsServiceImpl.
- Some clean-up.

Robolectric tests will be added later. Right now, there seems to be a
problem causing log messages not to appear, making debugging impossible.

Bug: 140808123
Bug: 136249261
Test: atest com.android.server.pm.CrossProfileAppsServiceImplRoboTest
Change-Id: Iefa6b2a7cb7535d5796d5ca8916c10b29c2e0661
3 files changed