system/ByteOrder: <endian.h> is a non-standard header that only Linux provides.
event/TimeoutMonitor: reset "active" flag before invoking OnTimeout()

The IsActive() method returned true even if the timer was not active,
after it completed once.  This broke the state file timer, and the
state file was not saved periodically.
Merge branch 'v0.18.x'