Fix for particle edit mode using wrong pixel distances.

rB57dba739176153e052d77611ff0e554f05984686 unified pixel distance values
but omitted a factor 100 for particle edit.
Code cleanup: UI - de-duplicate menu/row/listrow enum logic
UI: allow passing "" for icon only enum buttons and still get an icon

Enum icon-only buttons were getting their strings set,
then truncated with blenders string shortening methods, then not drawn
because there was no room (since buttons are icon width).

Modify UI code so icon-only buttons don't get names and passing "" to a
button won't have its text set later on.
OSX/bullet: i have to use -O0 again, else weird bullet behaviour comes back.
I overlooked in cmake my fix same time changed the optimization level to 0,
so not use optimization is the real fix ( postponed for after 2.70 ).
I appears we should investigate scons anyway: compileflags does not apply to c and c++ same time as expected.
Mesh API: replace octree mirror with kdtree
Mesh API: rename 'octree' to 'spatial' since internally its using kdtree
HSL color wheel implementation.

This is a standard Hue - Saturation - Lightness model
(see for instance entry on wikipedia here: https://en.wikipedia.org/wiki/HSL_and_HSV)
Note though the difference between HSV and HSL saturation, which are not the same.

The advantage of having this color selection scheme is that artists can select
shades and tints of a color easily by using the lightness slider. Also colors
are arranged on (approximated) perceived lightness on the color wheel.

Beware, Old files opened with this preference saved will crash!

Reviewers: sergey, brecht, campbellbarton

Differential Revision: https://developer.blender.org/D385
Fix T39111: Boolean assert failure on widows

In fact we had this change a while ago, not sue what happened.
Code cleanup (tm): Some code deduplication for HSL
Fix possible (unlikely) use of uninitialized pointer in RNA resolving
Fix T39114: cycles lamp ray visibility not working.

Thanks to Thomas for finding the cause.
Followup for fix T38318: Add back previous fix and fix a glitch.

The previous fix 162d6c73e3d0 has been cancelled because it caused a
problem that mesh deform cages and so on mess up the preview. To avoid
the problem, viewport doesn't show mesh object if its draw type is
bounding box or wireframe.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D375
Anticipate future color picker types and don't crash (uiBut could be
NULL in some cases)
Code cleanup: de-duplicate switch statement, style edits
OSX/cmake: set DEBUG_INFORMATION_LEVEL to "line-tables-only" for cycles, clang 3.4 (xcode 5.1) would not link with RNA in debug else
Freestyle: avoid checking PyErr_Occurred and quiet warning
Code cleanup: quiet warning, 'else' would always crash (& never occurred)

also quiet waning clamping
Fix T39148: Image does not show while rendering

Own regression since partial buffer update refactor,
display buffer for exr tiles should happen in image
update callback.

This revision is to be merged to the final release.
Fix for possible (unlikely) uninitialized var use in BM_face_split
BMesh: minor changes for BM_face_split use