telnet_server: support C-p, C-n for moving through history

This modifies telnet server to allow using common readline combinations to
move up/down history, without the need to touch cursor keys.

Change-Id: Ib659075883e91794b44f391f7c29bbdfdd679d10
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1376
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>