Work on domain job control and the job control api

I've decided against using callbacks in the core job control
code, as I wasn't actually using them, I also added/finished a function
to wait for a job to finish, and added two new fields to the virJobObj
struct. one to keep track of the number of threads waiting for the job
to finish and one to define a maximum number of threads that can be
waiting at one time.