Do not allow duplicated major version across <hal> in manifests

<hal> entries has to be grouped by versions. Otherwise, if
<transport> is different in two <hal> entries with the same
<name> and <version>, getTransport always return the first match.

As a side effect, fixes an incorrect behavior in
HalManifest::isCompatible that test for <instance> tags across two
<hal>'s with the same name and version (because it shouldn't occur
at all). This incorrect behavior is hidden under an
EXPECT_FALSE in libvintf_test. Now that this is never allowed,
the test is changed to EXPECT_TRUE.

Test: libvintf_test
Change-Id: I10d4619f3828bf695485938c315c73a924ba6340
Merged-In: I10d4619f3828bf695485938c315c73a924ba6340
Fixes: 38502835
4 files changed