fix OS check in toxic
fix define checks
fix potential memory issue
Prevented possible MITM attack.

Friends must now send to themselves at least one encrypted ping packet
every 5 seconds.

If no encrypted ping packets are recieved from a friend within 10
seconds the connection is killed.
Realloc apparently doesn't always behave like free() if size is zero.
Fixed segfault.
Merge with upstream
Merge pull request #497 from rose-m/master

Small OS check fix
fix tab bar bugs
fix tab bar bugs
Merge pull request #499 from JFreegman/master

fix toxic tab bar bugs
Some refactoring done.
Fixed issue 470, crypto_test still forcing libsodium when NaCL is chosen
Merge pull request #502 from stqism/issue-470-fix

Fixed issue #470, crypto_test still forcing libsodium when NaCL is chosen
fixed space handling in commands (issue #495)
Merge pull request #503 from rose-m/issue-495-fix

fixed space handling in commands (issue #495)
Merge branch 'master' into refactor
More refactoring done.
Refactor of core done.
nTox and cmake fixed.