Massive speedup when building up long reports, by adding beginEdit/endEdit

In the LongTextReport testcase, adding the elements to the report went
from 6s to 1s.