Cycles-Bake: fix T40270 Combined Type fails to bake Emission node

Main code and review by Brecht Van Lommel

Differential Revision: https://developer.blender.org/D543
Cycles-Bake: fix T40322 Glitch in baking a mixed SSS shader

If we are using a mix node we still need to evaluate the BSDF lighting
even if scattering is successful.

Note: this was working for branched path (probably an oversight when
branched path support was introduced for baking, a good oversight though
;)
fix T40323 Segfault on baking after rendering

The remaining functions in blender_python.cpp changed from using the
MACRO to use python_thread_state_save/python_thread_state_restore

Since this bug only happens when 'Persistent Images' is on it was
introduced in some of the early merges with master and I never caught
it.

Thanks Daniel Salazar for helping with the bug hunting.
Bake-API: relaxing in the check for scale uniformity

It still warns the user that there may be an error, but the baking goes
on. Also using the new is_uniform_scaled_m4() instead of float comparison.

Reported and fix suggested by Campbell Barton as a concern over 2bfc3deb