io: don't pull in tree and dependencies with `require "io"`.

* lib/std/io.lua (tree): Remove requirement.
(base): Replace with much lighter module.
(writelines): Call base.leaves instead of tree.ileaves. In
addition to reducing coupling, this also saves another round
of `argscheck`ing, and a callstack frame.

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