The _capture_stdout method was duplicated in a couple different test
classes that all inherited from PolicyBaseTestCase.
This commit just moves the method into PolicyBaseTestCase and removes
the duplicate implementations across test classes.
Change-Id: Id62db9bb0e6f0e6d0d2917714302947415cb9829