CPS transformer: Extract the variable hoisting

Move the variable hoisting out of CPSTransformer into its own transformer. Then let the CPSTransformer hook into that for its machine generated variables.