Add test demonstrating foreign elements are discarded on paragraph merge
Fix preservation of foreign elements on paragraph merge

This behaviour was working prior to the merge paragraph operation being
introduced. A new edge case was introduced related to cleaning up empty
spans that caused this to regress.
Merge pull request #770 from peitschie/merge-p-save-children

Fix preservation of foreign elements on paragraph merge