Use cppumock for critical sections.

This allows for easier testing.
Check that code in critical section is executed.
Tests breaking from critical section.
Build hot fix.
Enforce mock order for critical section testing.
Clean fix to the build problem.
Merge pull request #31 from antoinealb/master

Use CPPUmock for critical sections.
Use stable version of CppUTest
Removed trailing whitespace.
Added usage of the threading API.
Added test for stack init.
Added threading tests to package.yml