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.