State loading/saving: Instead of a blob, segment into sections marked with tags.

Primary rationale: The part that DHT saves changes if IP is expanded to IPv6. To let people keep their friends/name, change the datafile format now, while everybody is still on the same page.

Loading/Saving rewritten to allow a part of the file to be incomprehensible to the loading routine.
Added a magic cookie at the beginning to mark the file as tox's.
Changes in some part of the datafile can be skipped and the remaining parts still be consumed.
Allows a wide margin of forward compatibility (like the IP to IPv6 transition, but also e.g. a change in the key format).
As long as the file is not completely garbled, the routine will read as much as possible. Only the KEY section is considered mandatory: a malformed key section leads to a negative result.

util.*:
- holds the driving function which jumps from section to section and calls back with section length and tag (type)

Messenger.c,DHT.*:
- new loading functions call the util-function with a callback, which subsequently consumes the sections
- old routines are kept to fall back onto if the magic cookie at the beginning isn't present
- saving is still done in one local routine
Merge remote-tracking branch 'upstream/master' into MessengerLoadSave
Change sublength to 32 bits. Someone might have more than (sizeof(Friends) / 65536) friends...
Merge remote-tracking branch 'upstream/master' into MessengerLoadSave

Conflicts:
	toxcore/Messenger.c
	toxcore/util.c
	toxcore/util.h
additional length >= size checks

Messenger.c:
- additional size checks
- removed one pointless copying of data, instead using it directly

util.c:
- lost a newline vs. master
Merge pull request #576 from FullName/MessengerLoadSave

State loading/saving: Instead of a blob, segment into sections marked with tags.