Cycles-Bake: Cycles changes for shader evaluation to support cancelling via progress cancel callback

I would like to hear from Brecht on that one. Currently I'm changing
only device_cpu, but if this is correct we will need to change the other
devices as well (though I can't test here - no GPU - so I would rather
doing that with someone that can test it).
Cycles-Bake: Support for 'cancelling' the bake (Esc)

That involved some refactoring to work with wm_job. The main bake
function is now isolated from wmOperator and Context entirely.
(otherwise things crash due to threading).