Fix JID parsing

- A '@' sign is valid in the resource part
- The local part (username) can be absent

Also the result of GetFullJID() and GetBareJID() does not include '@' or '/' if
the local part or the resource is absent, respectively.
PR #1 from louiz-master.
Florent Le Coz fixed JID to be more conforming to XMPP standards.

Merge branch 'louiz-master'