rb_path_to_class should call custom const_defined? methods
It would be nice if rb_path_to_class called custom const_defined? methods. This would give marshaled objects a chance to locate and define classes when they are being unmarshalled.
I've attached a patch with a test that demonstrates the desired functionality and a (probably naive) implementation.