Description
When XMLStreamNormalizedNodeStreamWriter is emitting an empty element, we should be using writeEmptyElement() if possible. This requires us to postpone the call to writeStartElement() until we have see the next event. If that event is writeEndElement() and we do not have to emit namespace declaration, we can just use writeEmptyElement().
Same is true for writeElement(), which has an empty or null value.