Fix BOSH for ejabberd

I had to make a quick fix to make BOSH work for ejabberd. The main issue was that the xmpp:restart was not correctly sent and also that the contentType was malformed. 
It's not really a good change (especially this initialStart thingy) but it might help as a start for fixing the BOSH connection type.