Improve bfCheckJavaPath performance testing

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.
Merge pull request #745 from sbesson/matlab_performance_test

Improve bfCheckJavaPath performance testing