Add infrastructure for pre/post playbooks

This adds methods for running pre and post playbooks.  They are
not actually run yet.

The jobdir is no longer used as a context manager so that it can
be added as an attribute of the AnsibleJob.  This makes it easier
to access from tests.

The way results are passed around inside the launcher is changed
to be more clear and to potentially allow for expansion in the
future.

The synthetic 'RUN_ERROR' result that test_rerun_on_error relied
upon is removed.  In its place we simply set the requeue attribute
and check for a 'None' result.  That is a simpler method of testing
the same thing (that the launcher failed to get a result from the
main body of the job).

Change-Id: I335807576ffb76600ed8a3ac2355a8b5f8729240
diff --git a/tests/unit/test_scheduler.py b/tests/unit/test_scheduler.py
index 55c56d4..6426692 100755
--- a/tests/unit/test_scheduler.py
+++ b/tests/unit/test_scheduler.py
@@ -1920,11 +1920,11 @@
         self.fake_gerrit.addEvent(A.addApproval('approved', 1))
         self.waitUntilSettled()
 
-        self.builds[0].run_error = True
+        self.builds[0].requeue = True
         self.launch_server.hold_jobs_in_build = False
         self.launch_server.release()
         self.waitUntilSettled()
-        self.assertEqual(self.countJobResults(self.history, 'RUN_ERROR'), 1)
+        self.assertEqual(self.countJobResults(self.history, None), 1)
         self.assertEqual(self.countJobResults(self.history, 'SUCCESS'), 3)
 
     def test_statsd(self):