Merge pull request #308 from jdc8/master

C++ style comments result in compile errors with non-c99 C compiler
Fix issue #335

The CreateEvent function requests EVENT_ALL_ACCESS access rights
when the event object already exists. This causes problems
when the event object is created from a service.
The solution is to call OpenEvent function when the CreateEvent
failed due to access control.
The proper solution would be to use CreateEventEx function, but
this one is not available on Windows XP.
Merge pull request #309 from hurtonm/fix_issue_335

Fix issue #335
Implement ZMQ_TCP_ACCEPT_FILTER setsockopt() for listening TCP sockets.

Assign arbitrary number of filters that will be applied for each new TCP transport
connection on a listening socket.
If no filters applied, then TCP transport allows connections from any ip.
If at least one filter is applied then new connection source ip should be matched.
To clear all filters call zmq_setsockopt(socket, ZMQ_TCP_ACCEPT_FILTER, NULL, 0).
Filter is a null-terminated string with ipv6 or ipv4 CIDR.

For example:
localhost
127.0.0.1
mail.ru/24
::1
::1/128
3ffe:1::
3ffe:1::/56

Returns -1 if the filter couldn't be assigned(format error or ipv6 filter with ZMQ_IPV4ONLY set)

P.S.
The only thing that worries me is that I had to re-enable 'default assign by reference constructor/operator'
for 'tcp_address_t' (and for my inherited class tcp_address_mask_t) to store it in std::vector in 'options_t'...
Merge pull request #311 from shripchenko/master

Implement ZMQ_TCP_ACCEPT_FILTER setsockopt() for listening TCP sockets. 
some spaces cleanups + delete unused anymore zmq::max_sockets + some minor code chages
Merge pull request #312 from shripchenko/master

some spaces cleanups + delete unused anymore zmq::max_sockets + some minor code chages
Make docs reflect socket mappings better
Merge pull request #313 from ianbarber/master

Update socket docs
port of patch by Martin Sustrik to libxs: This patch instantiate a clock_t instance for each XS
socket. Thus, it is shared between subsequent calls
to xs_recv (and xs_send). That in turn significantly
limits the number of invocations of  getimeofday (or similar)
when timeouts are used and recv/send is called in a
tight loop.
Merge pull request #314 from ianbarber/master

Small patch to instantiate clock_t once
fix bug in zmq::tcp_address_t::resolve_interface() where all resolved interface ip's overwrited by 0.0.0.0
Merge pull request #315 from shripchenko/master

fix bug in zmq::tcp_address_t::resolve_interface() where resolved interface ip overwrited by 0.0.0.0
Fixed issue LIBZMQ-358
implement zmq_unbind(),zmq_disconnect(), zmq->sock->getsockopt(ZMQ_LAST_ENDPOINT_ID)
Merge pull request #317 from shripchenko/master

implement zmq_unbind(),zmq_disconnect(), zmq->sock->getsockopt(ZMQ_LAST_ENDPOINT_ID)
Merge pull request #316 from pieterh/master

Fixed issue #358
2nd try wuth sock->unbind() and sock->disconnect(). now with blackjack and const char*'s
fixes for

make[2]: Entering directory `/home/laotse/src/abs/zeromq-git/src/libzmq-build/src'
  CXX    libzmq_la-address.lo
address.cpp: In destructor 'zmq::address_t::~address_t()':
address.cpp:41:29: error: deleting object of polymorphic class type 'zmq::tcp_address_t' which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor]
cc1plus: all warnings being treated as errors
Merge pull request #318 from shripchenko/master

2nd try wuth sock->unbind() and sock->disconnect(). now with const char*'s argument