Load libsodium in a portable way

Here is my pull request to load libsodium.

I did some bad things to your tests, and had to rollback a bit so some of the commits are weird. But this PR is only changing the necessary files !