Remove trait CtxMethods  - work towards #11474
auto merge of #11475 : nielsle/rust/remove_ctxmethods, r=cmr

Remove the trait CtxMethods and convert all methods to functions. The diff is a little hard to read, but I tried to do very little apart from indenting and editing the  lines containing "fn"

This is work towards #11474 : Initialize BuildContext/WorkCache later in the build process