Separate most swing logic from core model.

This introduces a CachingDocument which wraps around an IRCDocument
and allows UI-specific caching of UI-specific styled lines (so, e.g.
the web UI could cache HTML versions if it wanted).

Also adds a delegating message maker and attributed string maker,
which incorporates the old "make a StyledDoc then change it into
an AttributedString" logic found in ui.core.util.Utils.

Hopefully this should mean all the the swing stuff can be punted
into the swing UI. The delegated maker will also allow colouring
of the new events to be done sensibly, I think.