Fix T40230: Recursion check when adding objects to groups is incorrect.

rB568f0c7 added a recursion check that is supposed to prevent cyclic
cases where a group includes itself via dupli instancing.

The check function was descending into all groups nested inside the
target group - which works for single level recursion like in the test
case, but does not handle generic recursion. Basically it asked:
"is object X in the group already or in any instanced dupligroup?"

The new check instead asks:
"is group G dupli'd by X or any instanced subgroup thereof?"
which is what we really need to know.
Update netbeans projectfile generator to v8
Fix T40246: Speaker Object is missing from Tabs > 'Create' tab in the Toolbar.
Fix BLI_cleanup_path: '.' at the start of a path

On windows "." was replaced with the root directory.
On other systems any path starting with a '.' would be replaced with "/"

This was added for the file selector only,
so better handle this in the file selector (though it looks not to be needed).
Promote MSVC 2013 to be the official platform (without a numbered suffix) for scons
Add ARRAY_SIZE macro to check fixed size arrays
Comment unused BLI_rebase_path
Fix T40201: Keyframe edits fail to update the viewport
Fix T40251: Rename of Shape key is not redrawed in Dopesheep.
Fix T39897: shape keys created while the Relative checkbox is unchecked start out with frame=0

So! First, frame for absolute shape keys: never allow a new key to have the same pos as an
existing one (this does not make sense). This way, the two workflows are possible (create
all keys and then animate ctime, or animate ctime and then create keys where you need them).

Also, fixed UIList for shapekeys, the "absolute" test was wrong, and better to show frame
value, even though not editable, than nothing in case of absolute keys.

And finally, add getter to RNA 'frame' readonly value, so that we output real frame values,
and not dummy internal ones (which are /100) in our API.
Correct ARRAY_SIZE macro and make doxy comments consistent
Workaround T40241: Vertex snapping snaps to wrong place
This reverts commit d1526da787fba050391747a9286f9e0521c6f2d1.

If tweaking is done by accident, user better increase threshold in preferences.
Move BVHType and shadingsystem enums to top-level of Cycles namespace.

Easier access of BVHType and deduplication for ShadingSystem.

Reviewers: dingto, brecht

Differential Revision: https://developer.blender.org/D534
Move ShadingSystem enum to shader.h
Add SHADINGSYSTEM_ to enum member names, so it is clear where they
are from.

Revert BVHType enum changes, as there's no need for code dedup here.
Remove two unnecessary includes.
Fix T40242: 3D view background images incorrectly shown during viewport render.

Now they are shown when they are also visible in other draw modes.
Fix T40194: cycles deformation motion blur not working with curves + shape keys.
Fix T40195: cycles smoke + persistent images animation render not working correct.
Code refactor: rename kernel_displace.h to kernel_bake.h.