Configure ejabberd and jwchat hostname during firstboot, not setup.

Reconfigure during firstboot to make sure we get the correct hostname.
Also move the config file edits after the reconfigure.