core: to_ref, to_ptr fix conversion
ruby: support for null pointer

ObjectClass.null generates a null pointer object on the ruby side
which can be passed to method calls