Fix b/i regression seen in round-trip testing

In round-trip test mode we don't serialize auto-inserted end tags. In those
cases we should also omit the <nowiki/> inside an empty italic/bold construct
to avoid creating dirty diffs in rt testing.

This bug should not be relevant for production, as the rt test mode is
deactivated there.

Change-Id: I1ccdc194aa5fe36228e5ecbfd5b1922481a09791
Merge "Fix b/i regression seen in round-trip testing"