Don't duplicate Proc objects if not needed

Currently, when its receiver is a subclass of Proc, Proc::from_env() duplicates
passed objects, even if not needed. The case is that passing instances of the
same subclass of Proc:

    class MyProc < Proc
    end
    prc = Proc.new{}
    my_prc = MyProc.new(&prc)
    # => returns an instance of MyProc duplicated from prc
    MyProc.new(&my_prc)
    # => SHOULD return my_prc, but DOESN'T, rather DOES duplicate my_prc
    Proc.new(&prc)
    # => returns prc, by comparison

The problem is that there is unintended code path in which the needless
duplication can happen.

Thus, the duplication logic is moved from Proc::from_env() into the ruby code
of Proc.new and a new primitive called proc_duplicate_as_subclass.

Also revert no longer valid changes done in the following commit, which
originally tried to fix this:

1abfbdf84e3dac829b9495d548ce43d10cf17d6b
Make Proc::from_env reset klass if appropriate