* 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).