split pySim/legacy/{cards,utils} from pySim/{cards,utils}

There are some functions / classes which are only needed by the legacy
tools pySim-{read,prog}, bypassing our modern per-file transcoder
classes.  Let's move this code to the pySim/legacy sub-directory,
rendering pySim.legacy.* module names.

The long-term goal is to get rid of those and have all code use the
modern pySim/filesystem classes for reading/decoding/encoding/writing
any kind of data on cards.

Change-Id: Ia8cf831929730c48f90679a83d69049475cc5077
diff --git a/pySim-shell.py b/pySim-shell.py
index a65e42a..4d4f2e2 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -49,7 +49,7 @@
 from pySim.exceptions import *
 from pySim.commands import SimCardCommands
 from pySim.transport import init_reader, ApduTracer, argparse_add_reader_args, ProactiveHandler
-from pySim.cards import card_detect, SimCard, UsimCard
+from pySim.cards import card_detect, SimCardBase, UiccCardBase
 from pySim.utils import h2b, b2h, i2h, swap_nibbles, rpad, JsonEncoder, bertlv_parse_one, sw_match
 from pySim.utils import sanitize_pin_adm, tabulate_str_list, boxed_heading_str, Hexstr
 from pySim.card_handler import CardHandler, CardHandlerAuto
@@ -95,10 +95,10 @@
         return None, None
 
     generic_card = False
-    card = card_detect("auto", scc)
+    card = card_detect(scc)
     if card is None:
         print("Warning: Could not detect card type - assuming a generic card type...")
-        card = SimCard(scc)
+        card = SimCardBase(scc)
         generic_card = True
 
     profile = CardProfile.pick(scc)
@@ -132,7 +132,7 @@
         # IF we don't do this, we will have a SimCard but try USIM specific commands like
         # the update_ust method (see https://osmocom.org/issues/6055)
         if generic_card:
-            card = UsimCard(scc)
+            card = UiccCardBase(scc)
 
     # Create runtime state with card profile
     rs = RuntimeState(card, profile)