Split the C auxiliary function `concat` into separate functions for
string and list/vector as target types, respectively. This makes them
simpler and faster.
Implement `Fcopy_sequence` more efficiently for strings, lists and
vectors instead of using `concat`.
The result is a significant performance increase for the Lisp
built-ins concat, append, vconcat, copy-sequence and anything using
them such as mapconcat, copy-alist and propertize.
* src/fns.c (concat2, concat3, Fconcat): Use concat_strings.
(Fappend, Fvconcat): Adapt to changed signature of concat.
(Fcopy_sequence): Faster implementation for lists, strings, and vectors.
(concat_strings): New.
(concat): Strip code for string target, simplify, optimise.
(Fcopy_alist): Use Fcopy_sequence.