refactor: upgrade to lua-stdlib v40 APIs.

Lua-stdlib is moving strongly towards proper interface hygiene,
preventing Zile from relying on stdlib entrypoints being
scattered across the global namespace and core libraries simply
by virtue of calling `require "std"`.
* bin/zemacs, bin/zz (std): Bump requirement to 40.
* lib/zile/keycode.lua (keycode_mt): Set metatable _type field,
to prevent elements being folded as if a multi-element tree key.
* lib/zemacs/eval.lua, lib/zemacs/keymaps.lua,
lib/zemacs/zlisp/buffer.zl, lib/zemacs/zlisp/search.zl,
lib/zemacs/zlisp/window.zl, lib/zile/file.lua,
lib/zile/keycode.lua, lib/zile/macro.lua, lib/zile/minibuf.lua,
lib/zile/term_curses.lua, lib/zile/term_minibuf.lua,
lib/zile/tree.lua, lib/zile/window.lua, lib/zile/zlisp.lua,
lib/zz/commands/buffer.lua, lib/zz/commands/search.lua,
lib/zz/commands/window.lua, lib/zz/eval.lua, lib/zz/keymaps.lua,
tests/run-lisp-tests.lua: Import stdlib APIs idiomatically.

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