Proper fix for CMake files

next time you're deprecating some platform, compiler, feature just either
mail in the ML telling about this or if you're not that lazy poke developers
online whether then can spot issues quick.

Or be ready to pick up stuff being done by the developers your change gives
headache to.
Fix T38623: Knife tool completely failing on interior geometry
Knife too: was using a ray-cast direction scaled down by the knife epsilon
Correct fix for knife interior use, distance needed to be in object-space
Cycles: revert part of the optimization from ff34c2d

This was faster for my AMD system but slower for Intel.

However with gcc4.9,-O3 I was able to get roughly the same speed before/after.

Revert since this isnt giving such clear benefits on most systems.
Freestyle: added more conditions to be able to switch to the line style texture properties context.
Freestyle: minor code clean-up.
Fix for own recent change to menu shortcut behavior

Missed setting the flag for operator-menus.
Now call `ui_but_add_shortcut` to match the rest of the api.
Fix for uninitialized unit_use_radians variable with inset and bevel
Cleanup a bit of the locked shape keys painting

It's still gives some slowdown when painting a locked
key in the solid view, but since shape key is now longer
being re-used by DM.

but this change should still give some degree of speedup
propagating delta onto the keyblock if i remember the
code correct.
Modifier UI: More space for Displace modifier texture ID.

Was really cluttered sometimes: http://www.pasteall.org/pic/70876
Reshuffled layout a bit to avoid this now.
Related to T39950.

When in sculpt mode add a multires, not subsurf modifier. Also allow
subdivision of multires when user explicitly requests a certain non-
Minor tweak to previous commit:

Do not subdivide if user has pressed page down
Fixes to previous sculpting tweaks

undo didn't work, layer and smooth crashed..
Fix T39946: OSL + tangent space normal maps not working in Cycles.
Over-optimized stuff in the previous commit, sorry.
Fix T40048: Cycles bake crashes Blender [when there is no image]

The struct with the images was not NULL initialized.
Followup fix to T39966.

The previous fix was not quite correct:
* It would use the same wireframe/bbox check in viewport- and regular render
* The duplicator loop in Blender Internal is more permissive now to avoid disabling wireframe duplicators, but this means we need to check is_object_hidden right before making render objects to ensure this still works.
Fix T40049: cycles baking glossy shader looks faceted.

Use smooth normal instead of flat normal as view direction.
Fix possible NULL pointer dereference in Cycles