Set external linkage on Rust functions defined with foreign ABIs.

This fixes an issue where `extern "C"` functions would have internal linkage, making them invisible to anything that might be linked against the resulting object. In my use case, a Rust function is being called from assembly, and because the Rust symbol did not have the right linkage, I ran into linker errors.

This has also now been applied to bare Rust functions as well as statics that are publicly visible; that is, those which have a fully public path.