Lift widget functions from C to Lisp
In the mid-1990s, these functions were moved from Lisp to C to
"improve performance". However, Moore's Law, and perhaps other
improvements too, has made this rationale irrelevant.
On this machine, with --native-compilation=no, I observed only a
slight ~4% performance difference. For example, displaying a buffer
full of widgets (e.g., 'M-x customize RET browse-url RET') takes 4ms
here, meaning the performance gap is under 0.1ms. Even on less
powerful machines, this difference would remain imperceptible. Given
this, let's lift these functions back to to Lisp, which offers the
usual benefits.
We already have solid test coverage, but let's add a more focused test
for 'widget-get' and 'widget-put' to be thorough.
* lisp/wid-edit.el (widget-put, widget-get, widget-apply): Move to
Lisp from...
* src/fns.c (Fwidget_put, Fwidget_get, Fwidget_apply): ...here.
(syms_of_fns): Remove defsubrs for the above functions.
* test/lisp/wid-edit-tests.el
(widget-test-editable-field-widget-get/put): New test.
(cherry picked from commit
8b659313b83c82cfe09af1638289fccdfc9af23d)