Merge branch 'kitech-ntox'
Fixed some nTox bugs.
fix nTox cmdline input slow problem.
Removed very old savefile compatibility to cleanup the code.
Removed None becouse it conflicted with the None defined in other
headers.
Const correctness for toxcore/util.c
Const correctness in toxcore/crypto_core.c
Const correctness in toxcore/list.c
Const correctness in toxcore/network.c
Const correctness in various interdependent files
Astyle and fixes.
Merge remote-tracking branch 'origin/ntox' into mine
Fixed some warnings.
Added warnings to travis building.
Fixed segfault when logging was enabled.

m->chats[c] can be NULL if more than one group chat is created and
one of the first ones is deleted.
Added ability to set custom lossless packets in Messenger.
pthread is now a core dependency instead of just a toxav dependency.

Fixed possible thread bug with sending A/V packets.

TODO: eventually make toxcore thread safe.
Updated TODO.
Attempt fix of tox_sync not building on some systems.
join_groupchat now fails when not direct connected.