Fix small streamengine issue w/ term and handshake

Also tidy up monitor test a little.
Merge branch 'master' of git://github.com/zeromq/libzmq
Merge pull request #583 from ianbarber/master

Small stream engine issue and test_monitor tidy up