Use luaposix's posix.openpty instead of gnulib's.
lcw.c: remove memory use optimization in preparation for converting more code to Lua.
Move output into Lua.
Move splitting of input into Lua.
Move input reading and signal handling into Lua.
Move process management into Lua.