Fixed crash in IB datasource if instrument sessions were not set.
Wrote several tests for IB.