XEP-0198: Gracefully handle wrong credentials

Produce a proper error message instead of crashing when the JID encoded
in the 'previd' value of a <resume/> request is different from the
authenticated JID.
XEP-0198: Gracefully handle broken 'previd'

Produce a proper error message instead of crashing when the 'previd'
value of a <resume/> request has an unexpected format.
Merge pull request #276 from weiss/xep-0198

XEP-0198: Don't crash if the resume ID is incorrect
XEP-0198: Create shorter resume IDs

Omit the user and server name from the 'previd' value.
Merge pull request #277 from weiss/xep-0198

XEP-0198: Create shorter session resume IDs