Fix for multitherad opt
Updated BPC algorithm
Cosmetic: fix some typos.
Merge pull request #11 from Underground78/typo_fix

Great job, I'm pulling it.. thanks!
Patch LCMS threading bug.

LCMS maintains a ContextID for the sake of the allocator callbacks.
In the call sequence through, it was losing this and ending up with
the allocators being called with NULL.

Simple fix.
Update LCMS2 to avoid race condition in Tag handling.

LCMS2 as supplied (in both 2.3 and 2.4 at least) is broken w.r.t
multitasking due to a race condition in the Tag handling.

When a TagTypeHandler is needed, it is looked up from a system table.
The existing code then writes into this table with the ContextID and
calls the handler. This is a race condition if 2 threads are using
the same TagTypeHandler at a time.

The fix implemented here is to copy the TagTypeHandler structure to a
local one, write the ContextID into that, and then call through that.
Fix LCMS threading issue with plugin registration.

When registering a plugin, allocations can be done. This can result
in calls back to the user supplied malloc functions, which assume
that a cmsContext will be supplied. In the current code there is
no way to pass a cmsContext into the plugin registration.

We therefore add a new function cmsPluginTHR that does take such a
context.
Fixes from Artifex
Merge github.com:mm2/Little-CMS
Merge pull request #12 from robinwatts/threading_fixes

All seems ok, proceeding...
Updated changelog
smooth tone curve fixes
Several fixes
Several fixes to cgats parser
Fix cppcheck warnings
8 bit devicelink generation
>Changes from Richard Hughes
Memory squeezing bug: lcms2 MatrixElemTypeFree

Destructors should cope with NULL.
Memory squeezing fix: lcms2 cmsPipeline construction

When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.

The fix here is to change cmsPipelineInsertStage to check and return
an error value. All calling code is then checked to test this return
value and cope.
Memory squeezing fix: LCMS2: AllocateToneCurveStruct

Simply add an extra check on the last allocation to avoid returning a
partially built struct.