The use of static makes this somewhat redundant currently, though if we later have multiple compilation units it will be needed. This also sets the dllexport needed for shared libraries on win32.
Also fix the nullness requirements for schnorr nonce-pair generation.