Fix part of T40964: Glass shader was giving wrong results with OSL.
Fix T40548: After canceling, F-Curve handlers don't go back to original position.

Handle vectors for the initial location were only stored when the handles are actually
selected for transform. When only the master vertex is moved this can still affect
the handles though, since they are constraint to one side of the master vertex.

Now the handle data is stored regardless of whether handles are included in the transform,
so on cancel their location is reset correctly as well.
Cycles: Equi-Angular and MIS Volume sampling work on GPU now.

* malloc() is used now, which is supported since sm_20: http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#dynamic-global-memory-allocation-and-operations The performance of this needs to be tested on various cards still.
* This also works for Heterogeneous Decoupled Ray Marching, but in this case I get sporadic "Illegal Address" errors on my Geforce 540, therefore I did not remove the GPU check in kernel_volume_use_decoupled() yet.

I would appreciate some tests from people who compile themselves, enable Volumetrics in kernel_types.h.
OSX/scons: Try to get rid of buildproblems with openjpeg enabled in certain build environments and prepend SDK_FLAGS to CFLAGS always
OSX/Scons: after doublechecking. take out sdk_flags from cflags again, looks as we always get sdk properly fron ccflags in subcompiles
Add support to lasso masking/flood fill for inverted values.

This can be used to subtract a region from masks but it's not very
user friendly yet. To male this work better, the tool will probably be
brushified later.
Fix for RNA_int/enum mixup
initial intersect code
minor wip
test visithash
split faces based on geometric tests
fix for rare crash