fix #qt_methods on anonymous classes

Anonymous classes have a name that's nil, and #qt_methods
will bail out on them (because of find_pclassid). This breaks
core Ruby methods as e.g. instance_methods, to reproduce:

    Class.new.instance_methods
Yes, I did something obviously dumb. I basically created an infinite loop (and obviously did not even test it). You version is buggy because you can create an anonymous subclass of a Qt class (and what you do would break this use case)