Move MSG_FILE to messages.h
Fix MSG_DATA index variables' types and handling

This fixes size disparity between MSG_DATA's
n and istart/iend fields, and related MESSAGES' fields.
Now they all are of new unified type MSG_IDX.

Dirty bit inversion hacks are replaced with explicit
MSG_IDX_MAX constant, used to indicate when an index
variable doesn't contain a sensible value.

All index calculations are now using the new type,
fixing some signedness warnings.
Move friend/group-related stuff to friend.h
Fix types to avoid signedness errors in friend.c
Fix types to avoid signedness errors in ui.c
Fix types to avoid signedness errors in list.c
Fix types to avoid signedness errors in scrollable.c
Fix types to avoid signedness errors in messages.c
Fix types to avoid signedness errors in dns.c
Merge branch 'fix-signedness-warnings' of https://github.com/albel727/uTox

#
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.