Added function and tests for parsing a JID-string.