Cache results of isWorkProfile().

This call can be slow. Once we've determined a user has a profile
owner app, that state won't change for the life time of a user, so it
makes sense to cache the value instead.

Bug: 192041648
Test: atest MediaProviderTests
Change-Id: I3041618959c0b4ea5dfb7546cfac13cf59931074
2 files changed