[dvsim] Small tidy-ups to mode selection in SimCfg.py
[dvsim] Small tidy-ups to mode selection in SimCfg.py

 - Copy a list more idiomatically

 - Simplify reading and writing build_modes and run_modes. These are
   named fields, so there's no need for getattr/setattr.

Signed-off-by: Rupert Swarbrick <290093e2ad2515ed2f14d749293c8cf8e02ca274@lowrisc.org>

lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan