Better performance for command history.

Don't set the input colors and font for every printed string. This operation
is a show stopper. Now we change the style only if the message type changes or
the related settings are changed.