OSX/CMAKE: extend my former workaround for failing tests with clang-omp to all build types
- this workaround makes sure the breaking -fopenmp is not exposed to testcompiles which use C_FLAGS respective CXX_Flags
- -fopenmp is always added to the CMAKE_C(XX)_FLAGS_<BUILD_TYPE> now
- another way to solve this would be to move the Configure OpenMP part after all line 2366,
but i don’t know if this would be apreciated
OSX/CMAKE: Way better fix for T40887, checks where failing with clang-omp
- found a way to feed just extra flags to the testcompiles
Correct IS_EMPTY macro

also prevent reading from BM_ELEM_API_FLAG_ get/setters
Math Lib: add function to get signed angle about an axis
Freestyle: fix for crash in the constructor of freestyle.types.StrokeVertexIterator.
Add bone_groups.new() and bone_groups.remove() methods to RNA.

To do so, matching BKE 'API' was also refactored a bit:
* Get Pose data instead of Object, as parameter;
* Removed some sanity checks not needed at such a low level (callers are supposed to do that);
* You can now remove an arbitrary bone group, not only the active one.

Based on patch by pkrime (Paolo Acampora), with own edits.

Reviewers: #python, pkrime, aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D522
Fix T40980: Exporting animation in MPEG Matroska using ffv1 and FLAC codecs fails
Fix T40164: Linking a Group of linked Groups don't take Dupli Visibility
correctly.

Problem was that object layers are defined by duplis as the top-level
duplicator layers. This happens //during// the duplilist construction,
which breaks group layer checks for subsequent instances and hides them.
Now the duplilist generators leave Object DNA untouched, the
modification of layers for drawing, rendering, etc. happens afterward
in the duplilist_apply/restore functions, as a kind of second pass.
Fix T40939: Border render and SSS doesn't work correct in rendered viewport

There were some missing updates in the viewport render job which lead to
wrong SSS mapping on the final resolution.

There was also wrong scaling applying when border render is used.

And last but not least(?) strands render was using first level of the
resolution leading to really thick strands in the final viewport.
Cleanup: get rid of magic numbers.
Cleanup: silent C++11 warning (implicit double to float conversion) in Collada code.
Implement Start Resolution for preview render in BI

So now viewport render resolution division works exactly the same as in Cycles.
Fix T41003: Object Info's Random socket produces erratic results when
material is applied to multiple Dupli instances of an object.

One of the random_id initialization lines for cycles objects slipped
into the basic update part in this commit:
rBb98ff5cb5b2c14c33b16e3b129e1e08810e90a6c

This would constantly re-shuffle the random_id ...
Fix T40991, mirrored armatures not restored properly when cancelling.

Issue here is that we force mirroring even if original armature is not
mirrored.

We could be smart and store only unselected mirrored bones here (since
those will get restored from transdata), however not all properties were
getting stored and restored; rolling bones still suffered from the bug
for instance.

To fix this we need to restore all properties that armature mirroring
overrides. Transdata obviously does not offer a lot of space here, so I
used TransInfo->customdata to store an array of initial parameters of
the mirrored bones.
Fix T40997, artifacts when unhiding part of the mesh in dyntopo.

Tagging a face as hidden should not be done only when hiding.
Attempt to mitigate issue T40981

Clipping border causes a software fallback on ATIs. We have disabled it
in that case but from minor digging on the net seems like Intels support
this, so enable.
Buildbot: enable cubins fox OSX

With new buildbot env they should be all fine.
Attempt to fix compilation error on 32bit OSX and SCons
Another attempt to fix issues with 32bit OSX and scons
Further tweaks to SCons's auto tests

We should do autotests only after setting path to sconsign,
otherwise using the same working directory and different
build directories will eventually break.