Allow loginit() to be delayed, store loglog() data in intermediate buffer and flush it out when loginit() is called

util.c:
- handle loglog() before loginit() by storing the lines into an expanding buffer
- when loginit() is called, write out and kill the buffer

network.c:
- push loginit() to the point where we know the actually used port
Merge pull request #588 from FullName/LoggingPreInitStoring

Allow loginit() to be delayed, store loglog() data in intermediate buffer...
reserve lower half of client lists for ipv4 for now

also rename client_in_list() to client_or_ip_port_in_list(), it also checks for an identical ip/port and replaces the client_id, recycling the entry

DHT.c:
- rename client_in_list() to client_or_ip_port_in_list()
- replace_bad(), replace_good(): if IPv6, only insert into the upper half of the given list
- addto_lists(): convert ipv4-in-ipv6 mapped to ipv4
Fixed bug in Lossless UDP.
Fixed bug in Lossless UDP.
Increased the size of the UDP buffers.
Small fix in Lossless UDP.
Fixed bug.
Fix compilation on windows for ipv6 code
reserving 50%+ for ipv4, take 2

DHT.c:
- we have to actually count the number of addresses in the field, because sort_list() will move the stuff around
- improved replace_good() substantially by throwing away the "furthest" client_id, not the one just a bit worse than the new one (but better than all the later ones in the field!)
Merge pull request #593 from BtbN/win_fixes

Fix compilation on windows for ipv6 code
Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Core.git into ipv6.yield50%toipv4
nTox: keep bootstrap()ping every 10 seconds, until we get a connection running (the initial one might get lost, it IS done via UDP after all)

nTox.c:
- main(): keep calling tox_bootstrap_from_address() every 10 seconds, until the connection is established
Merge pull request #594 from FullName/nTox.KeepBootstrappingUntilConnected

nTox: keep bootstrap()ping every 10 seconds, until we get a connection...
honor the claim of sort_list(), that the result is in anti-intuitive order, and treat element zero as the furthest
Small fix in Lossless UDP.
Thou shalt not take singular commands after an if into #ifdef DEBUG...

toxcore/Messenger.c:
- Messenger_load_old(): brackets around an #ifdef'ed line to avoid data pointer being only pushed forward properly in the error case
Merge pull request #595 from FullName/MessengerLoadSave

Thou shalt not take singular commands after an if into #ifdef DEBUG...
Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Core
Lossless UDP is now suitable for sending files.

Added some actual flow control and made send/recieve buffers grow when
necessary.