[res] Correct, optimize adding shared lib assets

When we add shared library assets to all ResourceImpl objects
there are several important details:
1. ApkAssets array contains both file-based and loader-based
   assets, and they have to be partitioned in this order,
   otherwise loaders won't be able to overlay all file assets

2. When adding all shared library assets they also may contain
   frros, and those need to be loaded as overlays explicitly

3. No need to repeatedly add each asset path as it involves the
   same steps of checking for duplicates and rebuilding the
   native structures

4. Given it's the constructor and it will force-set the
   configuration later, adding assets can be done in 'preset'
   mode without calculating anything config-related.

Bug: 345562237
Test: build, atest ResourcesManagerTest, simpleperf FRRO changes
Change-Id: Ia000549bbec06d5b8f649c7bff636c4f2a1dac22
2 files changed