Merge pull request #1106 from hintjens/master

Problem: zmq_connect() does not validate TCP addresses
Allow change of pthread priority

Rationale: In a real-time environment it is sometime mandatory to tune
threads priority and scheduling policy. This is required by our users
who mixes real-time and server threads within
the same process. It's not planned to support this on non-pthread
platforms (e.g. Windows).
Merge pull request #1107 from jlauenercern/master

Allow change of pthread priority
Code cleanups
Problem: zmq_connect doesn't return EINVAL on invalid endpoint

Solution: set errno to EINVAL when tcp:// endpoint is invalid (was just
leaving errno to previous value).