Synchronize zctx socket list access

See https://github.com/zeromq/czmq/pull/244 for a related issue.

This pull request:
* Adds zmutex synchronization to zctx socket-related methods
* Add assert(self) in zmutex_lock and zmutex_unlock
* Handle pthread lock creation errors

Therefore it allows sharing zctx_t objects between threads without zctx_shadow.