BeginUpdate/EndUpdate on documents. Use this in a bunch of places to make sure that EndUpdate is called in the face of early returns. Bug 131775, also fixes bug 211022, r=caillon, sr=jst git-svn-id: svn://10.0.0.236/trunk@148033 18797224-902f-48f8-a5cc-f745e15eee43