Pandas upgrade and other fixes

- Pandas - change use of DateRange to DatetimeIndex as per advised for pandas 0.14.1 upgrade
- Fixed socket cleanup issue with zmq
- Made tests work with pytest.
- Fixed some issues of and vs &