Adjust cmake build to use the new qpid exported cmake config files.
Add option to use qpid 0-10 or 1.0 default to 1.0 currently
Rework session thread code for fix to qpid that now throws
SessionClosed exception.
Improve the locking scheme so that locks aren't held where they could
deadlock because of callbacks.