Introduce a new use-sdk-lib attribute: optional, default false

1. Add a new use-sdk-lib attribute: optional`
2. Update the app install logic for checking sdk-lib dependency
3. Update the sdk-lib unintall logic if there are app dependencies

Bug: 295827951
Test: atest PackageManagerShellCommandInstallTest for the
flag/enable case
Test: atest PackageManagerSettingsTests
Test: atest ScanTests
Test: atest PackageParserTest
Test: atest AndroidPackageTest

Change-Id: Ib8a2056324d3007838c0953ad8b96c6353d2196b
21 files changed