classic ui: log errors into cgi log (use_logging=1)

since we already got the logit() stub in place, we just fake the core
logging, but reuse the cgi logging functionality, but only if
use_logging was set to 1 on cgi.cfg

more logging required though.

refs #4389