Move friend.h/dns.h include lower in main.h
Move MSG_DATA to messages.h
Move char_t definition into sized_string.h
Introduce STRING_IDX typedef for STRING index/size use
Use char_t/STRING_IDX/STRING_IDX_MAX consistently

In places where I found that
- uint8_t array is treated like utf-8 string,
it's replaced with char_t array.
- uint16_t is treated like length of/index in utf-8 string,
it's replaced with STRING_IDX.
- 0xFFFF is treated like invalid index in utf-8 string,
it's replaced with STRING_IDX_MAX.

I tried not to replace stuff in places which otherwise
would fit this description, but the types are mandated by
something else, e.g. Tox API.

The intention is better readability and maintainability,
elimination of 0xFFFF magic number, and possible future
ability to easily switch STRING_IDX to >=32bit int,
if we start feeling constrained by 64K strings.

I have verified with a script, that this commit doesn't contain
non-equivalent replacements, i.e. for each replacement pair of
lines in git diff, added line = deleted line where
  uint8_t -> char_t,
  uint16_t -> STRING_IDX,
  0xFFFF -> STRING_IDX_MAX,
replacements were done.
Use char_t/STRING_IDX/STRING_IDX_MAX part 2

This is the same as previous commit, but
this contains the only place where the replacement
lead to splitting the code line.

This is done for auditing purposes, as this is
the only place with equivalent replacement
that my equivalience-verifying script complained about.
Replace int with STRING_IDX where appropriate

This is like previous commit, but this introduces
a potentially breaking change, because types
are different. But afaics it shouldn't break where
previous version wouldn't have.
Use actual buffer size in win32 textfit()s

Stop using hardcoded 65536 buffer size,
risking buffer overrun due to unicode quirks,
or underrun for strings longer than 64KiB.

Pass real buffer size we were given instead.
Use UI_STRING_ID for curr_id in ui_i18n.c
Add a couple of comments
Merge branch 'albel727-less-magic-more-explicit-types'