Cycles: Optimization for Heterogeneous Volume Shadows.

* Don't compute expf() for every step, instead sum the intermediate values and calculate it every N (8 for now) steps. This helps a few percent (~5% on a cube with wave texture) in my tests here.
Cycles: Optimize Equi-Angular sampling using binary range search.

Patch by Lukas Tönne and myself.
Fix 'quick smoke' not rendering anything (texture coordinates was left unset)

Not quite sure why default did not work here, might need further investigation.
Cycles: Don't check closure flag in kernel_volume_decoupled_scatter(), we check this before the function already.
UI: avoid spacetype and butspacetype mismatch
Fix T41435: Info-text lags changing space-types
Cleanup: comment & var name
ColorRamp HSV, HSL Blend Modes

D297 by charlie with own edits
Fix T41443: Separate bug with Curves & Hooks

This solves the crash, but indices might be wrong after the separation.

There are loads of other ways to confuse hook indices in both meshes and
curves, for now considering this a TODO.
Modifiers: consider all constructive modifiers as 'preview' ones as well.

Indeed, constructive modifiers are highly likely to modify CDLayers like vgroups or vcols!

See vertexgroup2.blend file ({F93770}) in T40523, especially obvious with subsurf modifier.
Solidify Modifier "Rim Only" Option

D737 by scorpion81 with own edits
Revert "Fix T41222 Blender gives weird output when baking (4096*4096) resolution on GPU"

This reverts commit a48b372b04421b00644a0660bfdf42229b5ffceb.

Leaving only the part that fix device_multi.cpp
Final Fix T41222 Blender gives weird ouput when baking (4096*4096) resolution on GPU

It now uses the tile size to split the job. For CPU this may add
overhead, but for GPU this is highly needed.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D690
Correction to last commit, rna naming
Fix uninitialized imagepaint values on new scene, report by kopias on
irc
Cleanup
Fix T41427: Region overlap moves into wrong window.

There was some fuzzyness in `region_overlap_fix()`, using an 'other side' region
as ref to move current one in case their rect would intersect...

New code is a bit more complex, but should handle nicely all situations, mostly
ensuring we only translate an overlap if we find a previous one **on the same side**,
and ensuring we also never have intersecting overlapping regions from different sides
(since this does not work nice at all).
Fix compilation on linux (implicit conversion from double/float to size_t treated as error here).
Fix T41421

Don't store selection properties, if those are set in the keymap we can
end uo locking one state forever.
Fix T41454: Command "Dirty Vertex Colors" prompts Python error.