Introduce concept of CardProfileAddon

We have a strict "one CardProfile per card" rule.  For a modern UICC
without legacy SIM support, that works great, as all applications
have AID and ADF and can hence be enumerated/detected that way.

However, in reality there are mostly UICC that have legacy SIM, GSM-R
or even CDMA support, all of which are not proper UICC applications
for historical reasons.

So instead of having hard-coded hacks in various places, let's introduce
the new concept of a CardProfileAddon.  Every profile can have any
number of those.  When building up the RuntimeState, we iterate over the
CardProfile addons, and probe which of those are actually on the card.
For those discovered, we add their files to the filesystem hierarchy.

Change-Id: I5866590b6d48f85eb889c9b1b8ab27936d2378b9
diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py
index b6c003b..df8b842 100644
--- a/pySim/ts_102_221.py
+++ b/pySim/ts_102_221.py
@@ -31,7 +31,9 @@
 
 # A UICC will usually also support 2G functionality. If this is the case, we
 # need to add DF_GSM and DF_TELECOM along with the UICC related files
-from pySim.ts_51_011 import DF_GSM, DF_TELECOM
+from pySim.ts_51_011 import DF_GSM, DF_TELECOM, AddonSIM
+from pySim.gsm_r import AddonGSMR
+from pySim.cdma_ruim import AddonRUIM
 
 ts_102_22x_cmdset = CardCommandSet('TS 102 22x', [
     # TS 102 221 Section 10.1.2 Table 10.5 "Coding of Instruction Byte"
@@ -768,6 +770,11 @@
             # FIXME: DF.CD
             EF_UMPC(),
         ]
+        addons = [
+            AddonSIM,
+            AddonGSMR,
+            AddonRUIM,
+        ]
         sw = {
             'Normal': {
                 '9000': 'Normal ending of the command',
@@ -839,7 +846,7 @@
 
         super().__init__(name, desc='ETSI TS 102 221', cla="00",
                          sel_ctrl="0004", files_in_mf=files, sw=sw,
-                         shell_cmdsets = [self.AddlShellCommands()])
+                         shell_cmdsets = [self.AddlShellCommands()], addons = addons)
 
     @staticmethod
     def decode_select_response(resp_hex: str) -> object:
@@ -895,4 +902,5 @@
 
     @staticmethod
     def match_with_card(scc: SimCardCommands) -> bool:
-        return match_uicc(scc) and match_sim(scc)
+        # don't ever select this profile, we only use this from pySim-trace
+        return False