wg: Refactor socket create/bind/close operations
- Add the wg_socket_open() function to do socket creation and binding
for one AF, and then use it to simplify the wg_socket_init() function.
Meanwhil, wg_socket_bind() thus becomes obsolete and is removed.
- Clean up wg_socket_uninit(), wg_socket_set_cookie() and
wg_socket_set_sockopt().
- Add the 'so_lock' lock to protect the 'struct wg_socket' fields.
Update wg_send() accordingly.
- Add a comment about EADDRNOTAVAIL and single-stack support.
Referred to OpenBSD.