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).
Merge pull request #1109 from hintjens/master

Set EINVAL on invalid tcp:// endpoint in zmq_connect