refactor: use new functional apis in std.tree.

* lib/std/tree.lua (reduce, operator): Use these...
(fold, op): ...instead of these.

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