Refactor: cts,python: Move duplicate process functions into the library.
Also, make the process_names argument to killall required. In general,
a list should never be the default argument to a function. Here, we can
work around that by just making it required. Every caller passes a list
anyway so it's already treated as required.