Improvements to the dead code lint

@alexcrichton I brought back the libcore versions of the types without the unused variants, if that's OK.