shell: refactor REPL
lib: memmove function
shell: Left/Right arrow key support
lib: strnlen function
shell: Up/Down arrow key support

Up and Down now cycle through the circular history buffer.
Sending a command will always advance you, so if you go back to a series
of commands, you will end up overwriting the second after running the
first.

TODO: make that not happen