Fixed minor code error
No need to get-job for each insert- hang over from inserting a single job
Schema matcher should catch throwable. Had problems with not being able to see the exception from a stack overflow
Removing unused require
Added hooks for logging (not tested yet, except to make sure it doesn't fail existing suite). In the process, turned the api namespace into a protocol so we can close over agent-details and logger. Adding logger to all of the functions in api would have resulted in horrible signatures. Code everywhere is much cleaner as a result because we've stopped passing agent-details around.