[AppsFilter] use a copy of settings for recomputeComponentVisibility

ag/17540260 introduced the read-only interface for snapshot. However,
when recompute is called from the snapshot it holds mPm.mLock for more
than 500ms which significantly increases the boot time. This CL is to
move it outside `runWithState` which holds mPm.mLock. Followup CLs will
force `runWithState` to use snapshots when it is called from a snapshot.

Also use manual `onChanged` calls to reduce snapshot invalidations.

BUG: 228712570
Test: manual
Change-Id: I8a2dfa937100f77fccd1dab0a7d83944d6beea67
1 file changed