[pm] use snapshot instead of deep-copy of PackageUserState

When a snapshot of PackageSetting is requested, use the snapshot of
PackageUserStateImpl in the copy constructor of PackageSetting.
Otherwise, directly use the reference to avoid the overhead of deep
copying.

BUG: 218337678
Test: manual
Change-Id: I8f6b8bfbb5066c1b3ea604178c923725636eb1b3
11 files changed