BGE LibNew: Only warn about meshes with users in debug builds.

This information only really seems to be for helping developers track
down bugs, and isn't really something the user needs. So, lets not spam
their console.
Fix T40267: Addon's bug tracker urls not respected
Fix for uninitialized memory use in Cycles
Fix T40289: Cycles leaking memory

error in recent commit
Fix T40291: Crash when adding # driver to some fields
Fix T40271: recalculation of the bone roll does not work correctly.

Check that up_axis is not aligned with bone was wrong in at least two aspects
(not working against negative alignement case, and since ages it seems,
using Z axis when bones are along Y axis...).

Also optimized a bit here, better to have a normalized version of vec_roll_to_mat3(),
since it needs normalized vector anyway, and we have to normalize it for the tests
before calling it anyway (so now, we only do that twice in Transform code, instead
of three times).

And we can perform aling test *before* calling vec_roll_to_mat3!
Fix T39711: cycles particle motion blur affected by viewport draw method.
use C style string formatting
Freestyle: Added utility function SilhouetteGeomEngine::CameraToImage().

TODO: Fix for Z normalization in SilhouetteGeomEngine methods.
Freestyle: Fix for Z normalization in SilhouetteGeomEngine.

The Z component of the projected point in the 2D image space has already been normalized
in GeomUtils::fromWorldToImage().
Fix for a regression in rBe84732858590.
Freestyle: code cleanup - removed very old commented lines of code.
Freestyle: code cleanup: removed old commented lines of code in SilhouetteGeomEngine.
Fix T40222 texture painting on mirrored meshes does not apply pixel
bleeding at the symmetry edges.

We need an extra way to detect if faces overlap here. An easy way is to
detect the winding of the faces in UV space. If the winding differs, the
faces will naturally overlap. I have tried a few approaches here such as
choosing an offset point from the middle of the edge for intersection in
both faces of the edge in uv space, but winding is the safest way and
should work with very small faces/dense meshes too.
Minor cleanup of previous commit.
Fix T40299, Crash on rendering due to dependency cycles and NULL pointer when using particle duplis.
Bake API: partial fix T40156 (applyRotation issues)

This fixes most of the cases, the only situation not addressed is when
the highpoly object(s) has non-uniform scale.

mul_transposed_mat3_m4_v3() should take care of non-uniform scales so
I'm a bit confused on why it doesn't work. The lowpoly object can have
any transformation, the only issue is if the highpoly object has
non-uniform scale.

Test file of the remaining issue:
https://developer.blender.org/file/info/PHID-FILE-tpw2xgddyzxtpg3e7xzs/

Reference reading:
http://www.unknownroad.com/rtfm/graphics/rt_normals.html
Fix T40297: Crash while ripping an edge when autosmooth is activated.

Turned out there was still quite a few cases were indices were set dirty,
but elem_index_dirty was not tagged accordingly (mostly for BM_LOOP,
but a few others as well). So probably this crash was not the only one
hidden here.

Hopefully all possible cases were catched this time!
Fix T40283: Matcaps disables GLSL shadows
Fix for image garbage collection failing to run for render-only views

Check for freeing old images was running per-object, move this to viewport drawing.