refactor: factor out merge_allfields and merge_namedfields.

* lib/std/table (clone, merge): Move shared functionality from
here...
(merge_allfields): ...to here.
(clone_select, merge_select): Move shared funtionality from
here...
(merge_namedfields): ...to here.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>