Merge pull request #44 from hintjens/master

Fixed zpipes client to handle write errors
Problem: segfault at zpipes_server_engine.h:521

Caused by incorrect code sending event to non-existent local thread.
Trivially reproduced in zpipes_test_cluster by opening writer before
reader.

Fixes #46.