rustdoc: pass through --cfg to rustc

Closes #10623
auto merge of #10644 : cmr/rust/rustdoc_cfg, r=alexcrichton

Closes #10623