Removed some unnecessary RefCells from resolve
auto merge of #17654 : gereeter/rust/no-unnecessary-cell, r=alexcrichton

There is more that could be done, but this was the low hanging fruit.