[ruby] freeze and thaw nested classes correctly

correctly determine class to thaw, since rb_const_get on rb_cObject does not work with nested class strings like "ZXCFREEZE::InnerClass"