MOBSDK-727 & MOBSDK-722: Fix session handshake process for future 5.0 servers.

Also updated version number.
Merge pull request #294 from gavincornwell/1.3.1-dev

MOBSDK-727 & MOBSDK-722