Turned most objects into refcounted WgObject subclasses.

Also:
* Cleaned up WgResDB.
* Added interface pointers (untested).

Important things left to do:
* Change how WgTextManager connects to WgTexts.
* Change how WgSizeScaler connects to WgScalable.
* Handling of Glyph-references in Fonts and GlyphSets.