fwupdate-tools: Support for multiple components

At present ComponentIdentifier is used in
ApplicableComponents field to select images that
apply for a firmware device. Which restricts to
have same ComponentIdentifier for multiple
components. This patch will enable to use
ComponentImageInformationArea index in
ApplicableComponents field.

Unit Tests:
  1. Modify ApplicableComponents with index and
     verify the package with previous package.
     There should not be any difference
  2. Verify multiple components with same
     component identifier
  3. Test out of index for ApplicableComponents

Signed-off-by: Chinmay Shripad Hegde <hosmanechinmay@gmail.com>
Change-Id: Ibf5069d568f0a922d52db261219c2557d2d2f715
diff --git a/tools/fw-update/metadata-example.json b/tools/fw-update/metadata-example.json
index 185f985..ac080af 100644
--- a/tools/fw-update/metadata-example.json
+++ b/tools/fw-update/metadata-example.json
@@ -9,7 +9,7 @@
         {
             "DeviceUpdateOptionFlags": [0],
             "ComponentImageSetVersionString": "VersionString2",
-            "ApplicableComponents": [100, 200],
+            "ApplicableComponents": [0, 1],
             "Descriptors": [
                 {
                     "DescriptorType": 2,
@@ -29,7 +29,7 @@
         {
             "DeviceUpdateOptionFlags": [],
             "ComponentImageSetVersionString": "VersionString3",
-            "ApplicableComponents": [100, 200, 300],
+            "ApplicableComponents": [0, 1, 2],
             "Descriptors": [
                 {
                     "DescriptorType": 2,
@@ -40,7 +40,7 @@
         {
             "DeviceUpdateOptionFlags": [],
             "ComponentImageSetVersionString": "VersionString4",
-            "ApplicableComponents": [100],
+            "ApplicableComponents": [0],
             "Descriptors": [
                 {
                     "DescriptorType": 2,