debug_ext: use correct require dependencies.

* std/debug_ext.lua (say): Be explicit about the use of enhanced
string.tostring.
Be sure to require "list" before using its methods.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
refactor: move base.lua methods to more appropriate modules.

Move things around to remove more trampling of _G, and break the
remaining dependency loops, so that modules can all be required
independently.
* std/list.lua (M.append, M.compare, M.concat, M.elems, M.ileaves)
(M.leaves, M.new): Move from here...
* std/base.lua (M.append, M.compare, M.concat, M.elems, M.ileaves)
(M.leaves, M.new): ..to here, for breaking remaining dependency loops.
* std/list.lua (M.append, M.compare, M.concat, M.elems, M.new):
Import from base, and reexport.
* std/base.lua (_G.inodes, _G.nodes): Move from here...
* std/tree.lua (M.inodes, M.nodes): ...to here.
(M.leaves, M.ileaves): Import from base, and reexport.
* std/base.lua (_G.pack, _G.ripairs, _G.totable): Move from here...
* std/table_ext.lua (M.pack, M.ripairs, M.totable): ...to here.
* specs/table_ext_spec.yaml (pack, ripairs, totable): Add pending
example descriptions.
* std/base.lua (_G.metamethod, _G.id, _G.bind, _G.curry, _G.compose)
(_G.memoize, _G.eval, _G.collect, _G.map, _G.filter, _G.fold, _G.op):
Move from here...
* std/functional.lua (M.metamethod, M.id, M.bind, M.curry, M.compose)
(M.memoize, M.eval, M.collect, M.map, M.filter, M.fold, M.op):
New new module. ...to here.
* std/modules.lua: Add std.functional.
* std/std.mk (nobase_dist_lua_DATA): Add std/functional.lua.
* std/base.lua (_G.die, _G.warn): Move from here...
* std/io_ext.lua (M.die, M.warn): ...to here.
* std/std.lua.in: Reexport all recently modularized APIs into _G.
* std/getopt.lua: Explicitly import used modules.
* std/set.lua, std/strbuf.lua: Rearrange definitions to match other
modules.
* std/string_ext.lua: Require std.functional for metamethod().
(_tostring): Be explicit when saving a handle for _G.tostring.
* NEWS: Update.

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