Merge pull request #266 from mikeh/master

MOBSDK-646, MOBSDK-704, unit test fixes
MOBSDK-705:  Multiple-tenant handling code is incorrect
Merge pull request #267 from msaeedi/master

MOBSDK-705