Allow linking against crates with #[no_std]

Previously having optional lang_items caused an assertion failure at
compile-time, and then once that was fixed there was a segfault at runtime of
using a NULL crate-map (crates with no_std)
Add the ability to not link against rustrt
auto merge of #7924 : alexcrichton/rust/opt-lang-xcrate2, r=huonw

This is a reopening of #7874