Drop auto-inserted empty elements before p-wrapping
Otherwise, dropping them later can result in an empty paragraph,
if they were the lone node that was wrapped.
There is an odd discrepancy in Remex where it leaves an empty formatting
tag un-p-wrapped. Parsoid, for its part, does treebuilding and
p-wrapping on the dom in two separate phases and therefore they get
wrapped. See the test as an example, "2. List embedded in a formatting
tag in a misnested way".
This can be observed on,
In the treebuilder, we're now omitting shadow metas for auto-inserted
start tags so that they don't interfere with the empty element
calculations. This is consistent with what we're already going for
auto-inserted end tags.