Fix errors in the RerunFormatter, move its testing to core

Fix the rerun formatters handling of failures in background,
scenario outline examples and hooks in the RerunFormatter.
Move all testing of the RerunFormatter to core.
Move helpers from CucumberPrettyFormatterTest to TestHelper

Move helpers from CucumberPrettyFormatterTest to TestHelper, and
refactor to make the helper share implementation in TestHelper.