Protect some flags in a barrier by the barrier lock.
Fix TRI_FreeBarrier by giving two variants.
Merge branch 'devel' of ssh://github.com/triAGENS/ArangoDB into devel