fix for bug #3219 (undefined reference in GPU samples)
Record OpenCV build type among the test properties.

Because apparently I love running performance tests for debug builds.
replaced to_string by cv::format
Merge pull request #1625 from ilya-lavrenov:to_string
Merge pull request #1620 from SpecLad:record-build-type
In Java bindings, wrap version constants into functions to prevent inlining.

Java inlines static finals if they're defined with a constant expression. In
case of version constants we don't want that to happen, since they obviously
change from version to version. If the user substitutes a different OpenCV
jar without recompiling, we want user code to still have relevant values for
the version constants.

This arranges that by turning constant values into function calls, which no
longer count as a constant expression.
Delete an import of junit.framework.Assert, which is deprecated in JUnit 4.x.

We don't use it, anyway.
Merge pull request #1627 from SpecLad:java-version-no-inline
Merge pull request #1630 from SpecLad:java-deprecated-assert
Merge pull request #1375 from jet47:gpu-examples-build