core/socket: use _cleanup_free_
core/socket: fix SO_REUSEPORT