Remove `@mut Resolver`

Instead use &mut everywhere as much as possible and then reorganize lots of code
to get past the borrow checker.
auto merge of #9556 : alexcrichton/rust/less-at-mut, r=luqmana

Instead use &mut everywhere as much as possible and then reorganize lots of code
to get past the borrow checker.