Cycles: Small optimization for scenes without Transparent Shaders, helps a few percent.

Differential Revision: https://developer.blender.org/D570
Code cleanup, unused variables and comments.
Fix a typo in a comment.
Fix T40315: Boolean modifier with Freestyle edges.

The helper function `make_freestyle_edge_mark_hash()` was referring to the
original mesh to determine Freestyle edge marks for individual derived mesh edges.
This is no longer necessary now that derived meshes deliver CD_FREESTYLE_EDGE
and CD_FREESTYLE_FACE layers of their own.  The reference of the original mesh
was also inappropriate since the edges coming from one of the operands of a boolean
modifier don't have proper CD_ORIGINDEX values but ORIGINDEX_NONE's.

Many thanks to Sergey Sharybin for patch contributions and discussions.
Sync changes with buildbot server
Fix T40447: Creating Rigid Bodies is rejected for meshes without polys.

This check prevents using empty (no faces) meshes as rigid bodies.
While the idea makes sense, it also prevents using modifier-constructed
meshes, where faces are added only by the modifiers.

Further the check is very easy to circumvent, by removing faces after
making the rigid body, or by assigning a different mesh datablock
afterward.

Suggested by Fabian Emmes (@der_fab).
Fix T40459: Gauss table can be NULL when ending the blur node operation,
which must not be passed to MEM_freeN.
Fix T40342 smooth shading flag in dyntopo does not work under MSVC.

Classic case of integer flag AND-ing result passed to boolean and
failing.
Freestyle: Minor fixes.

- Fixed a typo in docstring.
- Replaced int with boolean constants.
- Updated lists of base classes for used-defined unary 0D/1D functions.
Keep active layer when setting up tracking scene

When you hit "setup tracking scene" in MCE, the active layer usually switches
to the layer where the ground has been created, thus he shadow layer.

New objects are created or appended on that layer which means they will be
default be rendered as shadows only. This behaviour requires muscle memory
and is confusing for new users. This patch is changing the behaviour in a
way that the active layer is remembered from before setting up the scene.

Patch by gottfried, thanks!

Reviewers: sebastian_k, sergey

Differential Revision: https://developer.blender.org/D574
Fix possible issues when blender is compiled without Cycles
Improve behavior of Setup Tracking Scene when default nodes exists in the tree
Fix T40457: Subsurf modifier with Freestyle edges

You can't use ORIG index as an index to copy CD from source DM.
Fix compilation error non non-linux architectures
Fix compilation on unofficial 64bit archs
OSX: Set Blender.app and Blenderplayer.app creation and modification date to compiletime, else we would always have the time from checkout here
Disable key-modifier detection when activating windows

Causes issues on X11 for some users
Fix T40448: Blurring bug in the compositor

This commit pretty much reverts all the changes related on tile-ability
of the fast gaussian blur. It's not tilable by definition and would almost
always give you seams on the tile boundaries.

Atmind already met the issue and tried to solve it by increasing some
magic constant, which is pretty much likely simply made it so compositor
switched to full-frame calculation in that particular .blend file.

Fast gaussian is really not a production thing and need to be avoided.
We're to improve speed of normal gaussian blur instead.
Code cleanup: use typedefs for ui handler functions
Correct last commit: workaround for BGE