find_package(OPENAL) does not play nice with our current library naming nonvention
String API: BLI_ascii_strtolower/upper now check NULL terminator

This wasn't needed before now, but since recent change to bUnit_ReplaceString,
it uses in a context where NULL terminator is expected - best add.
(spotted by Sergey)
Use HTTPS protocol for arc
Cycles / OpenCL: Let the OpenCL runtime determine its optimal work-group size automatically, by passing a NULL pointer here.

This is recommended in the Intel OpenCL optimization docs (http://software.intel.com/en-us/vcsource/samples/optimizing-opencl) and I can confirm a small performance increase here (1-2% on nVidia OpenCL, up to 8% on Intel OpenCL).
Fix T37709: Memory corruption when freeing custom bone shape objects

Summary:
Issue was caused by access to pchan->custom object from channel free
function when freeing all objects from main. Order of objects free
is not defined and such an access might easily end up with access
to freed memory.

We don't need to do user counter stuff when freeing main, so added
an _ex functions with do_id_user flag which is used when freeing main.

We had the same issue with other datablocks, so now it should be
easier to support relevant user counter.

This issue was caused by the fix for T36391, so perhaps that's indeed
high time to do real user counter.

Reviewers: brecht, campbellbarton

Reviewed By: campbellbarton

Maniphest Tasks: T37709

Differential Revision: https://developer.blender.org/D137
Implement per-frame track reprojection error visualization

It is now possible to display per-frame track reprojection
error in curve view of clip editor. Simply enable corresponding
option in filter buttons.

Currently displayed using blue color which might confuse with
average reprojection error, further color tweaks are possible
and easy.

Also changed icon track x/y curves. Better icons here are
really appreciated.
Motion tracking curves: correct some operator's poll functions

Curve selection and transform were allowed in cases track's motion
curve wasn't visible.
Use generic task scheduler for threaded image processor

It allows to schedule tasks of smaller size without having
threads overhead or extra worry about splitting tasks into
smaller pieces.

This simplifies code in color management which was manually
splitting task into smaller chunks to keep memory usage low.

Further optimization is possible by avoid malloc called from
threads, but that's how it used to work for ages already
and would be optimized as a separate patch.
Code cleanup: no need to switch to threaded alloc, it's done by task pool
3D View: Fix drawing bounds for game engine

Needs to be drawn around the origin to accurately represent collision
shapes.
3D View: Draw rigid body collision shapes.
Missed this in last commit
Code Cleanup: remove object arg to CDDM_from_mesh mesh_create_derived
BGE: Add missing NULL check from recent LOD updates
correction to last commit
Fix T37939: Crash on exit (reading from freed node trees)
Correct alloc string and comment in makesdna
correction to last commit
Cycles / Hair: Some cleanup and optimizations for hair code.

* Remove dead code from line segments BVH refine.
CURVE_KN_TANGENTGNORMAL and CURVE_KN_TRUETANGENTGNORMAL are either both true, or both false. Therefore a true/false condition is impossible.
This was a leftover of CURVE_CUSTOM, which was removed in r59234.

* Use "else if" in blender_curves.cpp.
Fix T37946: Error filling ngons