Add proper build flavour system and fix some worker-sleep issues.

3 jobs from master in 3 minutes 48 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #3818
build_cmake

00:56

 
  Test
passed #3819
run_tests

00:57

 
  Sanitizer
passed #3820
run_address_sanitizer

01:54