add function strip_ports to remove selected ports

with its unit test.

useful, e.g., for removing dependent variables like atomic propositions from the final transducer.