rm only use of type_is_immediate outside of trans
Add test for issue #9446.
fix dropping non-primitive immediates

Closes #9446
auto merge of #9643 : thestinger/rust/immediate, r=alexcrichton