Add APIs for optional uses-sdk-library

We introduce "optional" attr for uses-sdk-library, add two APIs
for this new attr.

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

Change-Id: I607a006f680f4f0b3704871b400b9849434a4b86
7 files changed