Add `test_manifest_on` and `test_manifest`

The old methods `apply_manifest_on` and `apply_manifest` enforced return
codes and would raise errors under certain conditions instead of
returning the stdout/stderr/exit_code for the testing library (rspec,
etc) to validate. It also required explicit return codes for testing
against failures.

This pull request:
- Creates a method `manifest_helper` which handles the logic for the
  following manifest methods
- Changes the name of `apply_manifest_on` and `apply_manifest` methods
  to `test_manifest_on` and `test_manifest` to reflect their behavior
- Defines methods `apply_manifest_on` and `apply_manifest` to be the
  same as before, but without the return code test enforcement
- Bugfixes the `:catch_failures` options argument and adds a
  `:expect_failures` argument for testing manifests.

This change is backwards incompatible.