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.
But would it not be better to do that by a real garbage collector (driven by a task) instead of making ops more complicated? This seems rather random to me :)
Or do other operations similar things at the position of execution?