add command system impl.
change command callback to receive number of arguments in the callback func.
fix bug failing to process lines containing \r\n.
add command system to app struct.
Merge branch 'cmd_system' into dev