unix, windows: validate flags on uv_udp|tcp_bind

fixes #1247