Add IRC logging filename generation

Based on asedeno's comment
"For IRC I'd probably want a combination of network and (channel or
nick)."
Log to subfolders of a base path

A different subfolder for each protocol.
Remove irc: from irc message filenames
Add a comment about existence of logging dirs
Also strip out characters less than !

That's SPACE and non-printing characters.  As requested by adehnert.
Update IRC logging to be more idiomatic

Based on a message from kini on #oplss at 2013-07-27 12:40:
   freenode / #oplss / kini  2013-07-27 12:40  (kini!kini@unaffiliated/kini)
       jgross: the standard format is "[timestamp] <username> message", one line per message
   freenode / #oplss / kini  2013-07-27 12:41  (kini!kini@unaffiliated/kini)
       non-message events are usually notated as "* event description", e.g. "* kini (unaffiliated/kini) joined
       #oplss", or whatever
Use g_utf8_casefold and g_utf8_normalize

We define a convenience function compat_casefold in util.c for reuse in
filters.
Warn if loggingdirection=out and classlogging=on

Fixes trac #242.

We warn whenever we get a non-personal message that would have been
logged if not for loggingdirection.