REVIEW-3365 Added missing synchronisation
REVIEW-3364 Reworked the compiler daemon manager

Now the managing of the idle/busy state is cleaner and tests are much simpler.