ed.py: begin implementing command mode (not just API)
Other recent commits included additions/revisions to api and ed.md
but commit messages did not mention them