Add rerunFailingTestsCount option for maven surefire to rerun failing
tests immediately after they fail.

When rerunFailingTestsCount is set to a value k larger than 0, failing
tests will be run up to k times until they pass. If a test passes in
any of its reruns, the build will be marked as successful and the test
will count as a flake. On the console it will output Flakes: N.

In the generated XML file, a flaky test will have <flakyError> or
<flakyFailure> inside its <testcase> element to store all the flaky
failure information, so all other consumers (such as Jenkins) will
still consider it as a passing test while potential consumers
interested in flaky run information can parse those elements and
extract information out. Failing tests will still have <faliure> or
<error> inside <testcase> as its first element, but will have
<rerunFailure> or <rerunError> afterwards if there is any, so it is
also compatible with existing consumers while keeping flaky run
information for future consumers.

It is implemented by maintaining a map between test full name, and the
map between all its test methods and the list of each run. It also
takes into account Fork and Parallel options and have them covered by
integration tests.
Merge branch 'master' of https://github.com/qingzhouluo/maven-surefire