AddBlockApex checks uniqueness for "factory" apexes

There can be many versions in /data/apex. Likewise, in AddBlockApex(),
we need to allow duplicates for non-factory apexes.

This is the case when "sharelibs" apexes are passed to VM because
we need all versions of "sharedlibs" apexes from host.

Bug: 256898152
Test: ApexTestCases
Merged-In: I8e80f1e2a6c7f031b4a0eef40067c44584aa8503
Change-Id: I8e80f1e2a6c7f031b4a0eef40067c44584aa8503
(cherry picked from commit abee35d239f86ccb274ba0e794a56cf64df878d6)
2 files changed