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.
Correct... this does fit the definition of garbage collection. However, the garbage adds up rather quickly in a reasonable short period of time editing a document, so if it isn't cleaned up regularly, it quickly becomes a performance & stability problem (e.g., the text position filters start to become quite upset and stop allowing the cursor in the right position -_-... but *that* is a different problem...)