Convert apropos-internal from C to Lisp (Bug#44529)
This runs insignificantly faster in C, and is already fast enough on
reasonably modern hardware. We might as well lift it to Lisp.
This benchmark can be used to verify:
(benchmark-run 10 (apropos-command "test"))
=> (0.
12032415399999999 2 0.
014772391999999995) ; C
=> (0.
13513192100000002 2 0.
017216643000000004) ; Lisp
* lisp/subr.el (apropos-internal): New defun, converted from C.
* src/keymap.c (Fapropos_internal): Remove defun.
(apropos_accum): Remove function.
(apropos_predicate, apropos_accumulate): Remove variables.
(syms_of_keymap): Remove defsubr for Fapropos_internal, and
definitions of the above variables.
* test/src/keymap-tests.el (keymap-apropos-internal)
(keymap-apropos-internal/predicate): Move tests from here...
* test/lisp/subr-tests.el (apropos-apropos-internal)
(apropos-apropos-internal/predicate): ...to here.