Fixing a bug where Smack cannot connect if the resource contains a '&'.

The XMPP resource name and JID are not properly escaped and may result in XMPP stream injection when given a maliciously formatted resource name. This fix ensures that the JID and the resource name are properly escaped when building the Bind IQ packet.