Cleanup: remove paranoid NULL checks
Cycles: Move system headers include to the top of the files

This is a good practice to do anyway, plus it'll help with the upcoming change.
Cycles: Workaround dead-slow expf() on 64bit linux

Single precision exponent on 64bit linux tends to be order of magnitude slower
than double precision version even with single<->double precision conversion.

Some feedback in the mailing lists also suggests that logf() is also slow, but
this i didn't confirm here in the studio yet.

Depending on the shader setup it gives ~3% with the secret agent shot and up to
around 15% with the bmw scene here.
Cycles: Fix for viewport rendering with debug enabled
Cycles: Optimize of volume stack update when sampling SSS

basically we skip all non-volume objects now in the volume stack function.
Depending on the show it might give some percent of speedup.

Most of the speedup would be gained in the scenes when having SSS object
intersecting the volume and taking a reasonable amount of frame space.
Cycles: Fix for camera-in-volume detection

Ray actually should have infinite length, so we can detect camera in a volume
which is bigger that the far clipping of the camera.

This might also give some speedup (wouldn't expect much tho) because we don't
need to re-calculate ray direction and length after every bounce now.
Cleanup: remove old preview code
Fix T42075: DnD Material not updating render view
Correction for wrong ifdef in creator
Compositor: implement OpenCL backend for gaussian blur

Pretty much straightforward change which gives around 30%
speedup on my laptop and around 2x speedup on desktop in
the BI (which uses gts580). Tested with huge blurs (like
10% of blur) which was rather common during Caminandes.

For now OpenCL is only limited for blur size more than
100 pixels.

This is a bit experimental still, feedback is welcome.

Reviewers: jbakker, lukastoenne

Subscribers: ton

Differential Revision: https://developer.blender.org/D576
Fix in-between mouse events getting assign to keys
Fix T4201: AVI Broken when width not multiple of 4
Fix T40350: Some texture prop did not have visual feedback they were driven.

This is only a (hacky) partial fix, actually, since `RNA_property_animated()` will still
not work in those cases... Better that than nothing, though.

Thanks to Campbell for review.
Fix Cycles crashing with previous own commit.

Behavior with NULL context was wrong.
Compositor; Explicitly specify inline function
Cleanup: avoid alloc for each knife-project vector
Texture painting:

Do not generate materials/images/UVs if they are missing.

Now we spawn a panel ("Missing Data") with operators to generate the missing data and
pop a warning if user tries to paint without them.

The reason we have reverted this is that it is too easy to end up with more textures
than we wanted. It was impossible to enter texture paint without having textures added,
and code makes too many assumptions about what user may want.

Discussed during Sunday's meeting.

This might be a candidate for 2.72a but I'm not sure how other artists will take this
(and how refined and crash-free it is), better make a few iterations first.

And for interested parties...test please, don't wait until after a release to poke with such issues.

Also, add slot operator now adds a new unconnected image node in cycles. Only
used in the "Missing Data" panel. This should be a separate commit but I am squashing it into the same commit because
it relies too much on changes done here and can be reverted easily if complainstorm occurs again.
One more bplayer infamous stub fix!
Fix T42088: Creating new keybinds can cause duplicates when saving key config profile

When patching a keymap with a 'UserPref' diff one, do not add keymap items from diff
if they already exists in patched keymap.
RNA: id enum was incomplete