Split result processing logic out from run_job

Move result processing logic into its own function to clean up code and
make testing more reliable.
Add event hook for context check complete call

Add an event hook that runs after run_job in order to trigger a Context
completion check.