Add run_command to module_common and update modules to use it.

See issue #1738.  No different than #1859, except f4dcb33 is now in the history.