refactor: use export function to simplify debug argchecks.

* lib/std/debug.lua (argcheck, argerror, argscheck, trace): Add
argument checking.
* specs/debug_spec.yaml: Adjust.

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