Don't use DNS while holding the event log lock. #4377

While writing the execute event (and holding the lock on the file), we
were calling gethostbyaddr() to convert the IP address of the stard to a
hostname. This is bad because gethostbyaddr() can block for many
seconds. Instead, we can use the remoteName data member of ExecuteEvent.