Improve bfCheckJavaPath performance testing (rebased onto dev_4_4)



This is the same as gh-745 but rebased onto dev_4_4.

----

This commit should fix instabilites in the daily build of TestCheckJavaPath.
Successive calls to bfCheckJavaPath are not treated as independent. More
precisely, performance is only assessed for the third call and onwards.