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.
Added new Output Line Style shader node for defining a node-based line material.
Fix for a wrong ID datablock referenced due to a typo in BKE_copy_linestyle().
Changed ntreeCopyTree_ex() to accept a pointer to struct Main.