Fix trimming trailing paragraphs in Markdown that contain elements.
Review Request #6671 — Created Dec. 2, 2014 and submitted
The code for trimming empty paragraphs didn't consider that a paragraph may have children but not text. It now checks for any child nodes before determining whether to trim.
This actually impacted the test run in /r/6670/. Unit tests pass with this.