librustc: Allow linkage attribute on any statics, not just foreign statics.
librustc: Respect no-compiler-rt target option for static libs as well.
Add tests.
librustc: Whitelist linkage attribute for unused attribute lint since it's processed during trans.
auto merge of #18890 : luqmana/rust/tf, r=alexcrichton

This is especially useful for declaring a static with external linkage in an executable. There isn't any way to do that currently since we mark everything in an executable as internal by default.

Also, a quick fix to have the no-compiler-rt target option respected when building staticlibs as well.