File transfer speed should jump up a bit faster.
Removed useless code.
Increased interval and ping packet timeout by 1 second to try to
fix TCP issues.
Fixed unaligned memory access.
Update to Libsodium 1.0.0 since backward-compatibility is guaranteed through all the 1.x.y releases.
Load file portability code for big endian.

Warning: only loads, doesn't save.
Merge branch 'urras-master'
fix #1124 by adding salt manip functions
Also, all data now has the magic number prepended. This is incompatible
for all but the save/load functions, but I think nothing besides the one
experimental qTox branch used any of those, which is why I feel confident
about the change.
Merge branch 'dubslow-master'

#
# 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.
Fix for memory leak. And add forgotten break
Fix uninitialized
Prevent lock
Don't send -1 bytes. There is such check everythere. But if we add it in side funciton the logic will change
Add a check (reported by Coverity)
Portability saving fixes for big endian systems.

Saves should now be portable from big endian to little endian systems
though I need someone to actually test it to be sure I didn't mess up.
Merge branch 'big_endian_save'
Fix use-after-free of toxav's TimerHandler

If msi.c:timer_terminate_session frees "handler", then when msi.c:timer_poll's thread resumes, there WILL be a use after free of "handler", with a likely segfault.

This use after free causes a crash in qTox, see tux3/qTox#534
Merge branch 'master' of https://github.com/xor2003/toxcore

#
# 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.
Merge branch 'toxav-uaf' of https://github.com/tux3/toxcore

#
# 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.
Fixed possible threading issues.