Cycles-Bake: internal saving and split image per material

We can now export more than one image (if there is more than one
material in the object), as well as automatically name the texture based
on the pass type.

This was a big refactor of the operator code, but things should be
stable now. use_automatic_name should probably be named use_prefix or
something.

Not working:
* use_clear (in fact it's always clearing, I need to copy only a few parts of the image, using a mask)
* image update - right now you need to click in the Image Editor to
  see/refresh the baked image
Cycles-Bake: code cleanup (goto, return)