Fix for missing visits of Freestyle-related ID data blocks in BKE_library_foreach_ID_link().
Fix for missing visits of ID's within SceneRenderLayer in BKE_library_foreach_ID_link().

Just noticed them while working on the previous commit (rB00f722042c07).
Fix T40282: Renaming node sockets in Cycles nodes causes crash.

Cycles expects to find all node sockets with their correct names, but
this can be changed via the API (see bug report discussion).

Solution for now is to let cycles accept this case gracefully instead
of crashing. The shader will simply use the internal default values for
inputs and any connections will be ignored.

Would be nice to report the error somewhere, but cycles doesn't have a
proper logging system for this purpose yet.
Fix compilation error after recent changes

fmc->script is a text datablock, for which we need to
access to it's IT property.
Fix T40522: Viewport layer name is not redrawed.

Yet another missing redraw flag catching (only affecting Cycles, in this case).
Fix T40519: Keyed parameter are not redrawed

The issue has been introduced in 1fabfc9 by changing
notifiers being sent.
Fix T38668: When using Maya Input style, there is no way to snap Knife tool to midpoints
Fix T40520: Properties panel in properties region in 3D view does not go away.

Ignore '_RNA_UI' IDP...
Fix T40370: cycles CUDA baking timeout with high number of AA samples.

Now baking does one AA sample at a time, just like final render. There is
also some code for shader antialiasing that solves T40369 but it is disabled
for now because there may be unpredictable side effects.
BMesh: avoid OpenMP use for low poly meshes (counting selection)

also use schedule(static) for simple for loops.
Fix T40514: Cycles world MIS segfault
OSX: Ideasman does not like using utsname, so i use the always satisfactorily working sysctl method now for runtime OS detection
Replace open() with BLI_open
Fix T40510, revert openmp thread count to how it was in
2.70 for non Apple systems.

Also refactored the code that restores the previous openmp thread count.
The logic here was weird, mostly due to all the commit madness with
Apple openmp support. The restored thread count though should not depend
on the on/off state of threaded sculpting (since it has to do with
systems other than sculpting only). For OSX threads are restored to the
system thread count but Jens should recheck here.
BMesh: avoid recursion for BM_mesh_edgenet, runs out stack memory on large nets
Fix mempool bottleneck alloc & freeing a single item

Would continuously reinitialize the first chunk of the mempool,
now check for at least 2 blocks.
Fix T40538: Multi-button canceling edit-text could leave edited value
Fix T40543: Duplicators draw with 'Render Only'
Fix T40529: Euler Rotation F-Curve Handlers wrong behaviour on moving keyframes
Revert "Fix T40382: 2D stabilization uses disabled markers"

It's not that trivial to support disapearing tracks in the sequence,
and since we're having ongoing 2D stabilization rework patch wouldn't
want to start doing rather bigger changes here now.

Let's just stick to legacy behavior for this release.

This reverts commits 91429d0, 543ce85