Problem: selftest failing on libzmq 4.0.x without libsodium

One assertion failure in zcert.c:68, and a bug in zsys_has_curve
which checked 'rc != EINVAL' instead of 'rc != -1'

Solution: fixed these issues.
Merge pull request #536 from hintjens/master

Problem: selftest failing on libzmq 4.0.x without libsodium