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.