"Compiler as a service" means breaking down the compiler into individual pieces.
Instead of having one big monolithic black box where source code goes into one end and compiled assemblies comes out the other, you get lots of smaller (black) boxes with typed output.
So you could, for instance, feed the source code into one box, and get an abstract syntax tree (AST) out the other. This tree could then be manipulated, before it is fed into the optimizer, out of which comes some other representation of the code, which could be fed into the compiler, which then outputs executable code.
Since I don t know a lot about the exact plans for the "compiler as a service" part of a future .NET, the above is just a wild guess, but that s how I see the possibilities.
Refactoring could then operate on the AST, and I would assume there was a way to go from the AST back to the original source code, both through mapping and conversion (mapping means you could take a node in the AST and ask "which part of the source code does this node correspond to", and conversion would mean "could you please give me the source code that this AST now represents, after I have modified it".)
For instance, I would see both JetBrains and DevExpress, both making refactoring tools for Microsoft, having to evaluate their own efforts into writing code that reads and picks apart code for refactoring vs. using the one provided by the CAAS.