Add Ref::take() for transferring references.