added ability to traverse multiple profiles within an IOR on connection failures
Refinments to bug848 commit to fix tests that were failing. Clean up the profile selectors to make the implementation easier to follow. Fix the codeset test to work on a mac.
removed redundant code