Better handling of hostname change for XMPP service

These changes should fix #9 and #33.

When changing the hostname, now for ejabberd.yml I only replace the hostname when it appears as an entry in the 'hosts' section. Also for the ejabberd backup database, I only replace the hostname in specified sections, and compare the formatting before/after the hostname to avoid false matches. (For example, if a user's name happens to match the old-hostname, it won't be accidentally replaced with the new-hostname.)

Use signals to trigger xmpp actions that need to run before and after changing the hostname. So instead of calling xmpp actions from the config module, the xmpp module listens for the appropriate signals then runs the actions.
When I first added the script to update ejabberd's hostname (https://github.com/NickDaly/Plinth/pull/66), I was using mnesia_change_hostname at first, but that approach required restarting the ejabberd service twice. This would take a long time (especially on slower devices like the Dreamplug), so @NickDaly asked me to eliminate one of the restarts. I couldn't find a way to do this using mnesia_change_hostname, so I switched to replacing the hostname manually.

The best solution would be to improve ejabberd so it offers the functionality that we need, but for now it's a trade-off of downtime vs configure script complexity.