Fix T41085: Blender crashes when using "spline" or "segments" for bevel curve factor.

Root of the issue goes to the fact that bevel list calculation might drop some points
if they're at the same position. This made spline length calculation goes wrong.

Now the length of the bevel segments is stored in the bevel list, so values are
always reliable.

Initial patch by Lukas Treyer with some tweaks from me.
Correction to the mipmaps generation

Seem we've always were wrong with multiplying alpha by 255,
other channels seems to be multiplied by 256 with the shift
operations.
Fix T41462: "Reload from trusted" button not prompting for confirmation.

Made 'revert_mainfile' op also handle the 'use scripts' option, and use it
for this feature (since it has a nice simple invoke confirmation popup).
Fix T41426: floating menus - scroll issues.

Do not reset active but if cursor is not over it when getting mousewheel events.
Fix T41474: Second renderlayer doesnt render if first one has 'Use Surfaces' disabled
Install_deps: Better handling of 'check installed' in Debian, and fix jack2d check.

Patch D742, by oweissbarth (Oliver Weissbarth), thanks!
Fix T41137: Old render result from viewport render in camera view does not go away when middle clicking
De-duplicate EWA filter code between renderer and compositor

The title says it all, move the EWA filter to BLI (currently it's
math_interp.c) and use the function from both BI renderer and the
compositor.

This makes more central place of the algorithm, allowing to have
fixes and optimizaitons synchronized across the two usages.

This also fixes T41440: Displacement in compositing creates holes

Reviewers: campbellbarton, lukastoenne

Reviewed By: lukastoenne

Maniphest Tasks: T41440

Differential Revision: https://developer.blender.org/D748
Fix building on some compilers (clang on OSX).

Reported and patch by jensverwiebe (jens verwiebe).