Task Bar|Console: Dismiss unentered command to history when task bar closed

Now whichever method is used for closing the task bar, the contents
of the command line are put in the command history and the command
line is cleared.