samples/ed.py: add s(ubstitute) function
p(rint) sets dot to last line printed
samples/ed.md: revise, about p(rint) and dot etc.
add test_cmd.py, revise other test_ed_*.py