Fix T37170: Missing curve outline when using constructive modifiers

Issue was caused by wrong bool flag assignment.
Bring back edit curve add menu

It was wrongly considered unused in rB5fdfa6d47542db32426ac080f071a1fd751e05a7
Fix T37056: Making segment flips curves it's not needed

Made the system around splines order a bit smarter, so
crating a segment between two splines wouldn't switch
direction if splines are selected in a way that they're
"co-linear".

It is possible to make things even smarter using active
point and so, but that i'd consider a TODO.
Fix T38033: cycles volume emission changes with step size.
Fix T37987: MSVC 2013 has C99 headers and warns for out define hypot _hypot for good reason it seems
Fix :I broke the build for MSVC 2008 this fixes it
UI: Tooltip fix for the Particle Template ID.

Reviewed By: brecht, dingto
Differential Revision: https://developer.blender.org/D165
Fix T38032, typo in Python API documentation.
Text3d: avoid converting utf8 to wchar_t in editmode
Text3d: store number of characters and utf8 length separately

EditFont's use of Curve.len was very confusing, in editmode it
represented the number of characters, in object mode the number of
bytes. add Curve.len_wchar and keep track of both.

Also don't convert the editmode text into utf8 on every keystroke.
Now this is done on exiting editmode or save - to match most other
object types.

This also fixes curves 'body_format' being reported with an invalid size.
Code Cleanup: remove strlen() and unneeded include in recent commit

also fix for incorrect sizeof() use.
Code Cleanup: WIN32 defines, check for _MSC_VER instead of !FREE_WINDOWS
Code Cleanup: use bool for bmesh operator boolean mapping functions
Code clean-up change naming of gpu buffers used by pbvh to better
reflect that. Previous name GPU_Buffers was very similar to GPU_Buffer,
renamed to GPU_PBVH_Buffers
Fix T38043: Text clipping when it shouldn't

Tweak some more 'middle clipping' (zoom issues).
Fix T38045: Clone stamp crashes

Issue seems to be caused by thread-unsafe IMB_freeImBuf.
Now use generic BKE_image_release_ibuf to de-reference
image buffer which was acquired from image datablock.
Fix crash when trying to reset color space to default value
Code refactor: move random number and MIS variables into PathState.

This makes it easier to pass this state around, and wraps some common RNG
dimension computations in utility functions.
Fix cycles OSL volume render crash with multiple closures.
Fix gcc compile error in last commit.