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.

Reviewed-by: Erik Schilling
Fixed potential memory issues in SpriteItem

* mSprite started as an uninitialized pointer
* It was always being dereferenced in the destructor
* There was no proper cleanup when the sprite ref was changed

Reviewed-by: Erik Schilling