refactor timestamp and name formatting into their own methods

With this otherwise-harmless patch, callers can now subclass ColoredStreamHandler and adjust more of the formatting.

I also turned off the socket.gethostname call when the handler isn't going to be showing the host name.