Flush file to disk after writing it.
Include required header for _commit() function.
Extract LOG_FILE_MSG_HEADER struct
Rid of magic offsets in log_read()
Clarify that only 1 bit in flags is used/known

log_write() currently writes only 1 bit, indicating authorship.
This commit makes it explicit, that only that bit is understood
by log_read().
Add static assert for LOG_FILE_MSG_HEADER size
Split MESSAGE->flags field into author and msg_type

Previously it consisted of authorship bit in the
lowest position, followed by a couple of bits indicating
one of 4 message types (text, action, image, file).

This led to more magic numbers, bit twiddling,
and arithmetic hacks, than is reasonable by any measure.

Since MESSAGE struct doesn't seem to be
format-restricted (e.g. on-disk format), this field
is removed and replaced with two straightforward ones,
and the 4 types are properly encoded as an enum.

Additionally TOX_FILE_OUT_PAUSE & Co. are now referred
directly instead of arithmetically too.

The end result is cleaner code and some comparison/signedness
warnings fixed.
Add another minor comment to MSG_DATA
Separate common fields in message structs visually
Fix whitespace in messages.c