Fix T40816, SSS brightness difference with Sample All Direct Lights.

This has been fixed before, but somehow got reverted in d644753319b6.
Fix T40813: Dissolve verts with adjacent regions, removes the dividing edge
Fix T40691, dyntopo changes lost on save if sculpting on multiple
objects.

Flush edits for all objects, not just the active one. Here we might want
to disallow leaving an object on sculpt mode when selecting another, but
this works, no need to enforce it.
Fix T40823, crash with LoD operator without valid object.
Fix T40758 Front facing not consistent in sculpt mode.

Some tools used view vector while others used the area normal.

Area Normal -is- useful and it will have to be incorporated to the
system better, but I'd like to do it in a way that is well
collaborating with sculpt plane calculation too, because it will have
to be slightly more expensive, i.e normal calculated before the plane,
never together, so only front to the area normal influence can be kept.

Currently sculpt plane takes into consideration view vector, but that
can produce an unwanted normal/plane at glancing angles on mesh edges.

Another issue that arises here is whether we do an actual calculation of
sculpt normal for each symmetry pass or we just flip the initial (former
is more expensive but more correct)
Follow up to previous commit, do not calculate normal now with front
facing.
Fix for DeviceScene::attributes_uchar4 not released properly

Reviewed by: dingto
Differential Revision: https://developer.blender.org/D620
Update Ceres to latest upstream version

Brings new bounds limiting and also prepares build system
for the changes in the upstream.

Namely shared_ptr header and namespace is now being detected
by a build system rather than by hacks in the code.

This commit includes some changes to auto-detection flags
in SCons, presumably adding more consistency there. This
is main changes which are suppoed to be reviewed here.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D581
Fix transparency issues in 3d viewport

The issue was introduced by 0f95149 and it only worked before
because default game material alpha blending was set to alpha.

Now it'll check whether material has transparency enabled and
will use alpha blending by default in this case.
MSVC: quiet harmless linker warnings
Update Carve to latest upstream version

This brings new copyright header which supports GPL2 and 3.

It wasn't really an issue before because we had agreement with
Tobias, but now it's all documented in sources.
BMesh: use slightly faster method of stepping over edge-disks
BMesh: add ability not to delete vertex when collapsing
BMesh: add BM_vert_is_edge_pair(), faster then checking (BM_vert_edge_count(v) == 2)
BMesh: tweaks to dissolve, remove wire edges before other calculations

also avoid feedback loop when checking topology giving nondeterministic results.
Fix T40834, grab brush not working after recent jittering fix.

Some brushes do not require location always. Made a list here, there may
be others but I think this pretty much covers this.
warning fix: use of __restrict was inconsistent in BLI_dynstr between declaration and definition
Get rid of usage of non-existing module
BMesh: more edits to vertex dissolve, handle mixing wire edges with faces better
UI: use cursor x-location for tooltip placement (T37478)