Instead of spawning thread for repo_done, place a request into DB

The request will be processed by dependency service. This is necessary
because I want Koschei to be able to get data also from older repos than
the current one and thus I need the generation to be done by separate service.
Refactor service to be class based

After adding more global services/caches class seem to be more manageable and
testable than globals and free functions.
Tests for service
Refactor scheduler to class-based
Refactor watcher to class-based
Tests for scheduler's main
Refactor polling to class-based
Tests for polling
Refactor dependency module into class based Resolver
Tests for resolver
Refactor backend
Migrate modules to new backend
Remember repo_id of completed builds
Record finish time for builds
Add deps_processed column to build

Dependency changes need to be recalculated after we know in which repo
it was built.