Improvements to the dead code lint

Ah, I just noticed the duplication between libcore and libstd.

That is fair enough. Not all of the variants in libcore are actually being used so I can remove the unused ones or annotate them with `#[allow(dead_code)]`.