job dependencies

https://progress.opensuse.org/issues/524

Please check especially the DB schema, I am not sure if I did everything correctly there.