Remove xmethod_worker::clone
I think that the clone method of xmethod_worker can be removed. It is
only used in find_overload_match, to clone an xmethod we want to
keep. Instead, we can just std::move it out of the vector and into
value_from_xmethod. value_from_xmethod creates a value that will own
the xmethod_worker from that point. Other xmethod_workers left in the
vector will get destroyed when the vector gets destroyed, but the chosen
one will keep living inside the value struct.
gdb/ChangeLog:
* extension.h (struct xmethod_worker) <clone>: Remove.
* python/py-xmethods.c (struct python_xmethod_worker) <clone>:
Remove.
(python_xmethod_worker::clone): Remove.
* valops.c (find_overload_match): Use std::move instead of
clone.