Console: Adding protections in console closing cleanups and changing system out messages to log.
One of the problems was a concurrent modification in ConsoleLayout.