Fix T41360: Crash on Boolean Modifier

The issue was caused by the wrong attributes maps in certain
circumstances after union intersections.

Namely issue might have happen when more than one iteration of
union was happening and it was caused by the fact that new faces
might be allocated on the same address as freed face from the
old mesh.

Didn't find a nicer fix for this apart from correcting the whole
attributes map after each union step.

We could try removing attributes for the meshes which are getting
deleted, but in asymptotic it's gonna to give exactly the same
complexity as the current approach.
Fix compilation error with debug scons

The issue is that we've got hell with DEBUG and _DEBUG,
theu're defined really inconsistent acros CMake and SCons.

Used more reliable NDEBUG definition for IDP_spit.
Fix T41362: CPU and GPU rendering gives different results

We can't really make CPU and GPU results look the same in all possible
circumstances, but here we can make them look close enough to each other
by making it so sobol pattern for bounce number is the smae for both
CPU and GPU.

This makes CPU and GPU render results look the same with low number of
samples, high number of samples was never an issue.
Fix T41403: Grid Particles only partially generated.

Getting dominant axis (biggest dimension of bbox) was wrong, now using BLI code for that.
Fix marker selection margin ignoring DPI
Fix uninitialized memory use
Spelling
Proof-of-concept implementation of Freestyle support for Cycles.
Initial implementation of Cycles materials for Freestyle stroke rendering.
Added debug prints.
Removed ad-hoc use of R_PERSISTENT_DATA for Freestyle/Cycles.
Fix for nested Cycles sessions.
Fix for hard-coded #include file paths.
Removed debug prints.
Added new operator "Create Freestyle Stroke Material" for testing.
Always use the Blender Internal renderer for stroke rendering.
Freestyle: Show the Freestyle Line panel of the Material properties context also in Cycles
Implemented a basic framework for node-based shaders.

Shader nodes will be used to define materials for stroke rendering, so as to
allow users to interactively configure textures.
Enabled USE_CYCLES_FOR_STROKE_RENDERING compile-time flag by default.
Minor fix for texture category name.