traverse: Send traverse end record from traverse child process
To improve the traverse performance, records are directly sent from
traverse child process to originating node. This creates a race condition
between ctdbd and traverse child. There are two fds from traverse child
to ctdbd - a pipe to track status of the child process and unix socket
connection for sending records. It's possible that last few records
are sitting in unix socket buffer when ctdbd processes the status write
from traverse child. This will be interpreted as end of traverse and
ctdbd will send the last empty record to originating node before it has
processed the pending packets in unix socket connection.
The race is avoided by sending the last empty record marking end of
traverse from the child process.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>