v.21.10Improvements

Fix zookeeper_log.address and optimize getpeername() calls in zookeeper client

Fix zookeeper_log.address (before the first patch in this PR the address was always ::) and reduce number of calls getpeername(2) for this column (since each time entry for zookeeper_log is added getpeername() is called, cache this address in the zookeeper client to avoid this). #28212 (Azat Khuzhin).
Fix and optimize the zookeeper_log.address column by accurately capturing the address instead of defaulting to :: and reducing frequent system calls.

Why it matters

Previously, the zookeeper_log.address column always showed the address as ::, which was incorrect. Additionally, each log entry trigger caused multiple costly getpeername(2) system calls. This update fixes the address reporting and caches the address in the ZooKeeper client to minimize unnecessary getpeername() calls, improving performance when logging.

How to use it

This fix is automatically applied in the zookeeper_log system log. Users do not need to take any manual action. The zookeeper_log.address column will now correctly reflect the client address with fewer performance overheads during ZooKeeper logging.