Make killing a job asynchronous
Added extra error checking.
Added a general purpose createDepend function.
Added support for creating dependencies with thrift API.