ed.py, ed.md: rename functions ed to main, ed_cmd to cmd
also rename module variable cmd -> cmd_name,
also rename function args cmd -> cmd_fcn, cmd -> cmd_string