tests: make tests run with a proper scheduler
so the scheduler interaction code is executed.
Note that this does not test for correctness in these interactions yet.
also move tests/__init__.py content in tests/conftest.py and adapt test code
accordingly.
This also ensures retries_left is set otherwise tests may fail when using
the local sheduler.