Support for multiple job dependencies

I started with @jchia's awesome [initial pull request](https://github.com/nvie/rq/pull/277) and reworked some parts to make it more readable (hopefully).

As far as I'm concerned, this PR is mostly complete except for some pipelining that we need to do for efficiency reasons.

Would be great if @nvie and @jchia can do another quick review on this PR so we can get this merged and get 0.4 out the door.