Added writePrefs into Preferences, so callers need no DOM_FORAECH anymore.
Implemented handleSet and handleResult for respective <iq> types.
I decided not to store any setting inside an archiving task, let the main app handle them.
Variables are now replaced with corresponding signals.