Merge pull request #621 from hintjens/master

Problem: new code is duplicated in zsocket and zsock
Merge pull request #622 from hintjens/master

Problem: zsock defines its own random number helper
strrchr const correctness. Fixes build in msvc.
Merge pull request #623 from jossgray/master

strrchr const correctness. Fixes build in msvc.
Merge pull request #624 from hintjens/master

Problem: trex code is flaky
Left another debug output, fixed
Trivial fix to selftest output
Problem: bind code was inelegant

Solution: use zrex for parsing. Combine random and sequential port
scanning into single loop, as they're basically the same work. I've
not tested this to exhaustion.

Note: we can now trivially add randomizaton for other endpoints, and
it might be smarter to return the last bound endpoint as a property
rather than via the return code.
Problem: vsnprintf use for endpoints is clumsy

Solution: use zsys_sprintf and remove size restriction on endpoints.

Note that _attach still uses fixed 256 limit; this should change at
some point to use zrex and no fixed size limit on endpoints.
Problem: WORD is reserved under MSVC

Solution: fixed use of WORD in slre.c; replaced with ALNUM.

Fixes #625.