ed.py: now ranges are like Python slices
i,j is from i up to j, includes i and excludes j
S() is now the length of the buffer, index of last line + 1
so p(i,i+n) prints n lines, p(0,S()) still prints whole buffer
test_ed.py: add cases to test d(elete) including delete end of buffer