Remove useless namegen thunk
auto merge of #7272 : Aatch/rust/namegen_thunk, r=thestinger

This removes the `namegen` thunk that was in `common.rs`. I also take the opportunity to refactor a few uses where we had a `str -> ident -> str` chain that seemed somewhat redundant to me.

Also cleans up some warnings that made their way in already.