Optimise XmlNodeConverter (#1176)
Optimise XmlNodeConverter (#1176)

* Short-circuit SerializeGroupedNodes on no child nodes.

Avoids creating unused Dictionary.

* Don't create Dictionary in ReadAttributeElements if it'll be empty.

* Reduce calls to JsonReader.TokenType virtual property.

* Remove duplicate finished boolean.

Different reasons for finishing the ReadAttributeElements loop are
noted, but the difference isn't acted on, so merge them.

* Check correct XML is from correct TokenType immediately.

(This changes the exception message in the case of it also being an
invalid objectType, but not the exception type).

bfriesen/Newtonsoft.Json,JamesNK/Newtonsoft.Json,ze-pequeno/Newtonsoft.Json,benaadams/Newtonsoft.Json,skarllot/Newtonsoft.Json,TylerBrinkley/Newtonsoft.Json,oxwanawxo/Newtonsoft.Json,jkorell/Newtonsoft.Json,ValtoLibraries/Newtonsoft.Json,brjohnstmsft/Newtonsoft.Json,PKRoma/Newtonsoft.Json