Update libsodium to 0.6.1 and use the detached signatures interface.

This diff updates libsodium to the current stable version and takes advantage of the detached signature API instead of using dummy buffers and duplicating hashes.