Daemon: some adaptions to make the daemon routines usable for XMPP-SC

Some rather small changes and much room for improvement, but this is the minimum for next steps. (Further branches pending …)