Some XML reading changes

* Got rid of the XmlReader::attribute and XmlReader::intAttribute
  accessors which were potentially a little inefficient.

* Used readNextStartElement and skipCurrentElement in more places to
  simplify the XML parsing code.

* Introduced a bunch of setters rather than declaring friends. I guess
  I'm just not really fond of "friends" since it makes code harder to
  move around.