rustc: Refactor middle::trans::inline
Fix ICE with trans of calls to foreign fns

It was failing occasionally.