Added exit flag and function exit() to Console class

Minor extension of functionality, should not change the overall behaviour. Please review and merge. :-)