avoid redundant translation of items during monomorphization
auto merge of #16059 : epdtry/rust/mono-item-dedup, r=alexcrichton

Currently, each time a function is monomorphized, all items within that function are translated.  This is unnecessary work because the inner items already get translated when the function declaration is visited by `trans_item`.  This patch adds a flag to the `FunctionContext` to prevent translation of items during monomorphization.