Improve flaky test detection

This feature will improve the flaky test detection logic and it will be user configurable so that each organization can define what is important to them.