Improve CGO performance
This ticket is analogous to tor#41075 (closed); some of the same principles will apply here, except:
- Kludgey solutions are less acceptable
- High-effort solutions are more acceptable
- Up-stream providers (for aes and polyval) may be more amenable to patches. (see for example https://github.com/RustCrypto/universal-hashes/issues/225 ).