debugger: add command-response processing

Now, when the debugger gets a command, it will respond with the bytes
that were received as part of the command.

With these building blocks, a shell can be created.