Set $name and $class properties in reflection to "public" to leave __get and __set methods free for inheritance

fixes #2684