FIX: test return code in startsess
FIX: move all functions out of the client class
FIX: remove all unused functions/methods except getReplicasNew()
FIX: ban has_key() and x in l.keys(), remove sortList usage
FIX: openSession may return 3 values (<0 if failed)
FIX: check first if we can open a session. if not, declare invalid
CHANGE: streamline usage of LFC return codes into Dirac return codes
Merge pull request #1382 from phicharp/FixLFC-1304

FIX: test return code in startsess