refactor: consolidate and speed-up ielems and elems functions.

* specs/table_spec.yaml (elems, ielems): Move from here...
* specs/lua_spec.yaml (elems, ielems): ...to here.
* specs/functional_spec.yaml (fold): Adjust ielems import.
* lib/std/base.lua (ielems): Remove.
* lib/std/table.lua (elems, ielems): Remove.
* lib/std/lua.lua (elems, ielems): Wrap ipairs and pairs, taking
care to honor __ipairs and __pairs metamethods, for a noticeable
speedup.
* lib/std/debug.lua, lib/std/list.lua, lib/std/tree.lua: Adjust
ielems imports and examples.
* build-aux/sanity-cfg.mk (sc_error_message_uppercase): Add
specs/lua_spec.yaml.
* NEWS: Update.

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