Cycles / CUDA: Increase sm_2x registers to 40.

This fixes the ptaxs "ACCESS_VIOLATION" error and should allow our Linux and Windows build bots to compile again.
Unfortunately this comes with a performance penalty on sm_2x cards, so this is only a workaround for now. Branched Path is still globally disabled on GPU.
GPU: replace callocs with malloc since reallocs aren't cleared
Fix T39646: Rigid Body Constraints non functional on release builds

-ffast-math is evil, not sure why it was enabled...
I seems to work better on OSX but it's still not a good idea.

The SConscript for bullet is a mess, I don't understand why
we use different flags for different platforms in the first place.
Seems to be a historical artifact but I don't know enough about scons
to try and clean it up.
Add material storage to derivedmesh.

The variables are considered invalid unless DM_update_materials is
called prior to use. Only use case currently is
mesh drawing. This helps with excessive allocation on the stack during
GPUObject creation, but may help elsewhere in the future as well.
More stack cleanup on GPU_buffers
Code cleanup: remove Object.bbsize, sizefac and pad
View3D: disable LOD when game engine is disabled or ifdef'd
Code cleanup: ifdef unused linklist for GPU drawobject's
Freestyle: fix for typos in Python API docstrings.
Fix T39608: Blender 2.70 crashes when performing union

This was a nasty bug which was caused by specific of how face-edge
attributes are stored in Carve.

Face pointer is used in the map key which works just fine in all
cases except for the cases when some face is getting freed after
it was stored in the map.

This might give real issues when new face is allocating because
it's possible new face would have the same address as the freed
one.

Such cases used to happen when union of separate manifolds is
needed for the operands AND jemalloc is enabled.

Solved by dropping attributes for the freed faces from the map.
Maybe not the fastest ever approach, but not sure how to make
it faster actually. Should work just fine. It only happens for
complex setups with intersecting manifolds in the operands.
Revert "FCurve Transform: scaling no longer changes hansle types"

This reverts commit 6cc5bdc99e63b05248f132833bfe0259c2a27923.

Revent this for 2.70a, it changes behavior too much without allowing
keyframe handles to be scaled some alternative way.
Make material array account for mesh/object storage of materials
Back buffer selection needs updates to materials.
Fix T39663: Blender crashes when trying to triangulate uv unwrapped mesh.

A dummy arg inversion! This is to be included in 2.70a!
Code cleanup: use struct type for mempool & style edits
More instances of needed material initialization.
BGE: Fixing a crash when animating objects with modifiers and armatures.

Our deformer system really needs some work. First, there was a crash
with shape keys because BL_ModifierDeformer derives from
BL_ShapeDeformer, which means we try to execute shape keys even if we do
not have them. Also, for some reason BL_ModifierDeformer::Update() does
not work if called from the threaded loop, so it is skipped for now. In
other words, skinned updates on meshes with modifiers are currently not
run in parallel.
BGE: Allow skinned meshes with modifiers to do skinning updates in parallel.
Remove extra glEnd() call.
Revert "Mempool: simplify memory chunk list building"

This reverts commit c82371fc06ffb8d2970c985b44167e9a5e0222f1.

Caused regression in iterator