creation of path from std::string on Windows (VC10/11/12) crashes (access error)

Summary:
Seems to be a known problem in boost: https://svn.boost.org/trac/boost/ticket/6320

Applied the solution but do not know if this is the right place.

Reviewers: dingto, brecht

Reviewed By: dingto

Differential Revision: https://developer.blender.org/D140
Math Lib: add dist_squared_to_line_v2, avoids sqrt in scanfill and 3d-text
Fix for BKE_nurb_handles_autocalc using 2d tests on 3d data
3D Text: use ghash for character lookups
Fix for 3d fonts loading the character of the string terminator.

also remove redundant call to wcslen and ensure FT_Init_FreeType runs
once the font loads.
Fix for text3d issue, \n was attempting to find a character too
Text3d: avoid calculating the font boundbox scale for every character
update console shell for changes in api
Fix T37939, concern raised in rBd9e0a94: Avoid access to linked node
tree ID data when freeing bNodeTree data blocks, while also making sure
localized node group copies get freed properly.
Fix regression T37971: Crash setting recursive dupli-verts
Cycles Volume Render: work on nodes and closures.

* Henyey-Greenstein scattering closure implementation.
* Rename transparent to absorption node and isotropic to scatter node.
* Volume density is folded into the closure weights.
* OSL support for volume closures and nodes.
* This commit has no user visible changes, there is no volume render code yet.

This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
Cycles Volume Render: add flags to quickly detect when objects have a volume shader.
Code cleanup: move shadow_blocked function into separate file.
Cycles Volume Render: support for rendering of homogeneous volume with absorption.

This is the simplest possible volume rendering case, constant density inside
the volume and no scattering or emission. My plan is to tweak, verify and commit
more volume rendering effects one by one, doing it all at once makes it
difficult to verify correctness and track down bugs.

Documentation is here:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Materials/Volume

Currently this hooks into path tracing in 3 ways, which should get us pretty
far until we add more advanced light sampling. These 3 hooks are repeated in
the path tracing, branched path tracing and transparent shadow code:

* Determine active volume shader at start of the path
* Change active volume shader on transmission through a surface
* Light attenuation over line segments between camera, surfaces and background

This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
Cycles Volume Render: add support for overlapping volume objects.

This works pretty much as you would expect, overlapping volume objects gives
a more dense volume. What did change is that world volume shaders are now
active everywhere, they are no longer excluded inside objects.

This may not be desirable and we need to think of better control over this.
In some cases you clearly want it to happen, for example if you are rendering
a fire in a foggy environment. In other cases like the inside of a house you
may not want any fog, but it doesn't seem possible in general for the renderer
to automatically determine what is inside or outside of the house.

This is implemented using a simple fixed size array of shader/object ID pairs,
limited to max 15 overlapping objects. The closures from all shaders are put
into a single closure array, exactly the same as if an add shader was used to
combine them.
Use ccl_device_inline for SSE perlin noise

msvc ignores inline hint here and generates a bunch of push/lea
Cycles Volume Render: add volume emission support.

This is done using the existing Emission node and closure (we may add a volume
emission node, not clear yet if it will be needed).

Volume emission only supports indirect light sampling which means it's not very
efficient to make small or far away bright light sources. Using direct light
sampling and MIS would be tricky and probably won't be added anytime soon. Other
renderers don't support this either as far as I know, lamps and ray visibility
tricks may be used instead.
Fix cycles volume render crash when trying to access primitive attributes
like generated texture coordinates or tangents.
Fix missing check if isect_plane_plane_v3 fails to find an intersection.
Fix for inexact 3d cursor placement especially when zoomed out.

Even with the startup scene clicking multiple times in the corner of the
view without moving the mouse would move the cursor a little each time.