Incorporate libsodium option and linkage, generalize, update packaging.