Job dependency

Hi there,

This is my first attempt on implementing job dependencies. As usual, comments are welcome, especially on naming, APIs and implementation details.