Fix #755: Allow to get currently running command from CConsoleApplication

Fix #755: Allow to get currently running command from CConsoleApplication

Solution is based on "CWebApplication / CController" behavior.
Migrated from #1453.