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.

For example, given the valid JID:
example.com/strange@resource 
(example.com is the domain, strange@resource is a resource, and the local part is absent)
The result of GetFullJID(), before the fix, is:
example.com/strange@resource/strange@resource