Addresing TODOs from globalGetByDocId

This adds tests to try faking the callingTarget parameter by passing it
directly to the AppSearchManager service, as well as test that
packages cannot access documents in other packages if they are not
authorized.
In addition, the global variable is no longer used in getByDocId, but
rather the calling and target packages are compared to determine if a
global call is being made.

Test: Run atest --rebuild-module-info CtsAppSearchTestCases
Bug: 203819101
Change-Id: Ia9e0a70b261ab5286c39d813f1bf16e540f64c1c
6 files changed