refactor: use a function to simplify bad argument specs.

* specs/spec_helper.lua.in (badarg, toomanyarg): Assemble a
suitable error string from arguments.
* specs/function_spec.yaml, specs/math_spec.yaml: Simplify
accordingly.

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