Don't --profile with --fail-fast and failures

i.e. don't display slow examples in the output if `--fail-fast` option
is used and there are any failures as it clutters the output.

References #730.
Make JSON formatter behave the same as text formatter

When it comes to `--profile` and `--fail-fast`.
Extract `mute_profile_output?` method
Merge pull request #825 from pjg/disable_profile_with_fast_fail

Disable profile output if there are failures and --fail-fast is used
Make backtrace cleaning the responsibility of a class

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Refactor the backtrace cleaner for greater clarity

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Use exclude instead of discard in the backtrace cleaner

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Use "an_exclude" instead of "a_exclude". Grammar is important.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Change include? for exclude? on backtrace cleaner

This also removes the helper methods.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Make the description on one of the BacktraceCleaner tests more readable

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Rename backtrace_clean_patterns to backtrace_exclude_patterns

This also deprecates backtrace_clean_patterns

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Remove Configuration#cleaned_from_backtrace?

We now use config.backtrace_cleaner.exclude?

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Add specs exposing failing attribute setters

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Pull backtrace cleaning behaviour into the backtrace_cleaner object

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Change include/exclude for inclusion/exclusion in the backtrace cleaner

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Change add_setting to match the new cleaner names

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Remove add_setting calls in backtrace_cleaner

this are now unneeded because we've defined instance methods that handle
these configuration options

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Kill deprecation warnings for new backtrace specs

This is done by either using the new backtrace_exclusion_patterns or
stubbing RSpec.warn_deprecation

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Fix failing html/text_mate formatter specs

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Revert "Remove add_setting calls in backtrace_cleaner"

This reverts commit ae7fb79b38365420a2cd9bb2e6ea9672b161191f.