BMesh: avoid using OpenMP when nothing to do

Gave slowdown drawing on high poly meshes
Freestyle: Fix for a wrong formula used for RGB to grayscale conversion.

This bug fix is likely to affect the visual results of existing Freestyle setups using the
Material color/alpha/thickness modifiers with the 'material_attribute' parameter set to
either 'Diffuse' (default) or 'Specular', and also the Ramp option enabled in the case
of the Material color modifier.
Fix T40423: UV Editing 'Draw Other Objects' fails with Cycles
Freestyle: Fix for Interface0DIterator.object docstring with additional notes.
Correct hard-coded height for UV-Vertex buttons
Blender Internal: Fix for lamp option "Specular" not working when "Only Shadow" is enabled.

This is followup to rB8008d9bdfd57. Blender Render and GLSL preview
now produce the same results.
Fix T40436: No preview in Brush with Cycles

More like a feature request, but after i've implemented preview for
icons it was rather simple to support nodes previews.
Code cleanup: mixup hflag/htype
Avoid openmp sections in BM_mesh_elem_index_ensure
Fix T40382: 2D stabilization uses disabled markers

This lead to unpredictable results in some cases.
Tweak to previous commit
Fix subpixel precision in transform node

The node was using sampler from the callee node and passed
it to the input nodes. Since the fact that compositor output
node uses NEAREST interpolation (why it uses nearest is the
whole separate story) it's not possible to have subpixel
precision in such cases:

  <image> -> <translate> -> <output>

For now solving by hard-coding translate node to use BILINEAR
interpolation. It can't become worse in this node anyway and
the sampling pipeline is to be re-visited from scratch.
Fix T40429: cycles CUDA + use persistent images problem.
Fix T40228: cycles CUDA multi GPU + world MIS giving error.
OSX: replace deprecated (10.8 ) Gestalt function with utsname, no functional change
Merge remote-tracking branch 'origin/master'