package_ext: don't perturb the global environment by default.

For backwards compatibility, `require "std"` will still write
symbols into the global namespace, but when loaded directly be
much more hygienic and return everything in a table, like most
other modules:
* src/package_ext.lua (M): Define module symbols in this table
and return it.
* src/std.lua.in: Inject package_ext module symbols into global
namespace.
* specs/package_ext_spec.yaml: Specify new behaviour, being
careful about `require "std"` side-effects.
table_ext: don't perturb the global environment by default.

For backwards compatibility, `require "std"` will still write
symbols into the global namespace, but when loaded directly be
much more hygienic and return everything in a table, like most
other modules:
* src/table_ext.lua (unextended): Remove.
(M): Include core lua table.sort function as M._sort, and
return M.
* src/std.lua.in: Inject table_ext module symbols into global
namespace.
* specs/table_ext_spec.yaml: Specify new behaviour, being
careful about `require "std"` side-effects in global namespace..
* src/base.lua, src/fstable.lua, src/getopt.lua, src/object.lua,
src/string_ext.lua: Save "table_ext" import into a local table and
call APIs directly from there.
string_ext: don't perturb the global environment by default.

For backwards compatibility, `require "std"` will still write
symbols into the global namespace, but when loaded directly be
much more hygienic and return everything in a table, like most
other modules:
* src/base.lua: Don't depend on list or string_ext modules to
break a depndency loop.
(_G.require_version, _G.render, _G.tostring, _G._tostring)
(_G.prettytostring, _G.pickle, _G.assert): Move these "stringy"
functions from here...
* src/string_ext.lua: ...to here, breaking another dependency
loop.
(M): Define module symbols in this table and return it.
* specs/string_ext_spec.yaml: Add pending examples for the
relocated APIs.
* src/std.lua.in: Inject string_ext module symbols into global
string namespace, and newly relocated base functions directly
into _G.
* src/debug_ext.lua, src/getopt.lua, src/xml.lua: Use required
string_ext return value from a local table.
* specs/string_ext_spec.yaml: Specify new behaviour, being
careful about `require "std"` side-effects.
refactor: move leaves and ileaves from base to list.

Break another dependency loop.
* src/base.lua (_leaves, _G.ileaves, _G.leaves): Move from here...
* src/list.lua (_leaves, ileaves, leaves): ...to here.
(M): Adjust.
* src/io_ext.lua: For ileaves, `require "list"` instead of "base".
(writelines): Adjust.
* src/tree.lua (M): Re-export list.ileaves and list.leaves as
tree.ileaves and tree.leaves.
* src/std.lua (_G): Re-export list.ileaves and list.leaves to the
global environment.
io_ext: don't perturb the global environment by default.

For backwards compatibility, `require "std"` will still write
symbols into the global environment, but when loaded directly be
much more hygienic and return everything in a table, like most
other modules:
* src/io_ext.lua (M): Return a table of previous io_ext globals.
(file_metatable): Move from here...
* src/std.lua.in: ...to here.
* specs/io_ext_spec.yaml: New specs. Specify behaviour of loading
just io_ext, or indirectly via `require "std"`.
Add pending examples for remaining io_ext APIs.
math_ext: don't perturb the global environment by default.

For backwards compatibility, `require "std"` will still write
symbols into the global environment, but when loaded directly be
much more hygienic and return everything in a table, like most
other modules:
* src/math_ext.lua (M): Return a table of previous math_ext
globals.
* specs/math_ext_spec.yaml: New specs. Specify behaviour of
loading just math_ext, or indirectly via `require "std"`.
Add pending examples for remaining math_ext APIs.
debug_ext: don't perturb the global environment by default.

For backwards compatibility, `require "std"` will still write
symbols into the global environment, but when loaded directly be
much more hygienic and return everything in a table, like most
other modules:
* src/debug_ext.lua (M): Return a table of previous debug_ext
globals.
* src/debug_init.lua: Wrap _DEBUG in a returned table, but
initialize from _G._DEBUG when first loaded.
* specs/debug_ext_spec.yaml: New specs. Specify behaviour of
loading just debug_ext, or indirectly via `require "std"`.
Add pending examples for remaining debug_ext APIs.
* Makefile.am (SPECS): Add specs/debug_ext_spec.yaml.