Clean up update_MediaInput, add getMediaFromTable
Clean up update_MediaInput, add getMediaFromTable

1) Clean up and simplified update_MediaInput function.
2) Implement getMediaFromTable for pegs_is_ok and pegsless_is_ok.

crcrewso/EGSnrc,ftessier/EGSnrc,mchamberland/EGSnrc,marenaud/EGSnrc,mchamberland/EGSnrc,crcrewso/EGSnrc,mchamberland/EGSnrc,nrc-cnrc/EGSnrc,ftessier/EGSnrc,nrc-cnrc/EGSnrc,ftessier/EGSnrc,MartinMartinov/EGSnrc,crcrewso/EGSnrc,MartinMartinov/EGSnrc,marenaud/EGSnrc,ftessier/EGSnrc,mchamberland/EGSnrc,marenaud/EGSnrc,MartinMartinov/EGSnrc,marenaud/EGSnrc,mchamberland/EGSnrc,MartinMartinov/EGSnrc,crcrewso/EGSnrc,marenaud/EGSnrc,marenaud/EGSnrc,mchamberland/EGSnrc,ftessier/EGSnrc,nrc-cnrc/EGSnrc,crcrewso/EGSnrc,nrc-cnrc/EGSnrc,MartinMartinov/EGSnrc,ftessier/EGSnrc,nrc-cnrc/EGSnrc