Fix tests, fix doc build, fix one bug

Not all test cases would be possible to bring in sync with current implementation with just a reasonable effort - see uses of QEXPECT_FAIL
Let's get @VDVsx and @blammit to take a look, the scheduling is something which would be good to get unit tested.