refactor: simplify list.flatten implementation.

* lib/std/list.lua (flatten): Simplify.

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