shell: add more versatility

The current shell implementation allocates the line buffer on the stack,
which is a bad idea. A REPL session cannot be quit.

This PR adds a parameter where to find thestatically allocated line buffer.
Tt adds the command "quit" to exit the current shell session, which e.g.
enables the use of nested shells. Error results of `shell->readchar()`
end the session as well, and aren't ignored anymore.