Fix key check: also need to check the terminating NUL byte, to ensure the string finishes there, else "hello"
and "helloyou" compared with length=5 are equal, which is not desired.
Also make it so that listeners for ATTRIBUTE_MODIFIED are only called when the attribute's value does indeed
change from the previous one.
Move write-to-FD code to header file for common inclusion in all output modules.
Tried to keep this memory efficient; easy when all events are to be sent, slighly more complex if only valid
events, interspersed in the packet, are to be sent: either use scatter/gather IO if within certain limits, or
do a costly alloc-copy-free operation.
Continued work on file output, only file-naming TODO.