Fix Lua console so that it lets you continue incomplete commands

It was always supposed to do this, but at some point (probably the switch to Lua 5.2) it stopped working. If you hit return when the current command is syntactically incomplete, it will insert a newline and let you continue the command, instead of showing a syntax error.

Unfortunately, the Lua API doesn't actually have a good way of determining that a command is incomplete. The way that the official Lua REPL (lua.c from the Lua distribution) does it is to look at the syntax error message and see if it ends with "<eof>". Personally I think that's sort of disgusting, but it's the only practical way.