Jobsmodel api

Now ready for merge.

Supports getting a job, a list of jobs and changing the state of a job.