refactor: use a function to export io apis.

* specs/io_spec.yaml (catdir, catfile, die, monkey_patch)
(process_files, readlines, shell, slurp, splitdir, warn)
(writelines): Update to latest style.
Add "too many argument" behaviour checks.
Simplify and standardise argument error message comparisons.
* lib/std/io.lua (M): Add module name at element 1.
(catdir, catfile, die, monkey_patch, process_files, readlines)
(shell, slurp, splitdir, warn, writelines): Upgrade to
base.export declarations (for overhead free argcheck calls with
_DEBUG = false) and simplify accordingly.
(catdir, catfile, die, monkey_patch, process_files, readlines)
(shell, slurp, splitdir, warn, writelines): Improve LDocs.
* NEWS: Update.

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