Merge gsoc2012-doxygen branch

I'd like to merge this branch into master. There is still a lot of work to do here (and I intend to fix at least some bugs), but this seems to be already useful in its current state, i.e. it's better than nothing and doesn't seem to break anything not related to Doxygen (although this remains to be tested, which is another reason for creating this pull request: I hope Travis will do it for me).
I'm not clear why `classtypes` (and `enumtypes` below) have been changed from being class members to static variables.  I believe we only instatiate one `Language` subclass per run so it's probably equivalent, but it seems better to me for them to be members, and the change doesn't seem to be related to adding doxygen support.

Also not clear why this method is no longer `const`.