Fix bugs in the permissions support API

1. PermissionChecker#checkCallingPermission used wrong pid and uid

2. FragmentCompat and ActivityCompat for pre-M devices now check
   the permissions via the package manager to determine the result
   for the callback.

bug:22982938

Change-Id: I4a8834585ee0d245b7a6a1123ec1dafc71594b04
3 files changed