Check more live Path nodes in dead-code pass
Dead-code pass now marks and warns foreign items
auto merge of #10870 : ktt3ja/rust/issue-10865, r=alexcrichton

Fix #10865 and #10939.