fix some unicode in zmqhandlers

Prevented session identity from being set properly, which in turn prevented stdin from working in the notebook in Python 3.

closes #3494