simplify add custom command
update unit test
do not allow adding same commands
use realloc to avoid memory leaks
use stl map to oprate command
delete un-used code
fix console readline
fix console hang
use local variable to reduce coupling
remove redudant prompt
Merge pull request #5342 from heliclei/console-user-command

closed #4063 :revise CCConsole to support more easily for adding custom command.