Libmv: Fix wrong variable use in scons
Fix black matcap when using particle system

Using matcap with a displist is not really good thing to try
and it's actually a regression since we've enabled matcaps
for all objects instead of just an active one.
Fix for wrong bit mask magic happening in gpu_update_lamps_shadows()
Code cleanup:

calc_manipulator_stats is only used in manipulator (and soon will only
use the context for such queries)
Cycles: optimization of panoramic camera in volume

Now we do much better preliminary check for panoramic camera is inside the
volume object boundings.

Also we're now cacheing the has_volume in the mesh, which makes it unneeded
iterations for each object's shaders.

Should be no functional changes, just faster sync and panoramic-in-volume
rendering.
Update link to the Support an Animation Movie link

This is to be in the final release.
Comments: note on bmesh_region_match

also correct buffer type
Cleanup: spelling, ws
Cycles: Speedup of kernel side camera-in-volume detection

The idea is to only count intersections with objects which has volumetric shader
and ignore all other objects.

This is probably as fast as we can go without involving some forth level magic.
Cycles: Make camera-in-volume an official feature

This means it's no longer needed to enable experimental feature set in order to
have proper camera in volume support. And this also means if there's something
wrong going on, or if there's speed regression for cases when camera is obviously
not in the volume -- this issues are to be reported and handled in the regular
matter.

Happy blending!
Cycles: Fix for non-initialized variable
Cycles: Implement preliminary test for volume stack update from SSS

This adds an AABB collision check for objects with volumes and if there's a
collision detected then the object will have SD_OBJECT_INTERSECTS_VOLUME flag.

This solves a speed regression introduced by the fix for T39823 by skipping
volume stack update in cases no volumes intersects the current SSS object.
Fix T41920: Changing Use Alpha settings doesn't refresh viewport properly
Fix T42054: Problem when using Cast modifier with Wireframe modifier.

Wireframe modifier needs valid normals, let's ensure that!
Better fix for T42054 - modifiers have a callback to say whether they need normals or no.

Thanks Campbell for the headup!
Cycles: Decouple object flags update to a separate update step

This way there's much less cross-references between objects and meshes
device update functions.

The only thing remained s the object bounds calculation which is needed
by bvh update. This could also be decoupled, but it's not that crucial
yet because its's how it used to be for ages now.
Sculpting:

Grab and Snake hook brushes now support strength. To keep compatibility
with older brushes, this commit also sets strength to 1.0 for those
brushes.
Cycles: Use more accurate implementation of erf() and erfinv()

This functions are  orders of magnitude more accurate than the old ones,
and they're around the same complexity to compute.
Fix for 2-sided faces in array modifier
Fix T41983: Array regression with center-verts

Array with rotation and a central pivot would fail.

Thanks to Bastien Montagne for the initial fix.