Fix running Java tests with run.py on everything other than Windows.

Previously, run.py would assume that the opencv_java library is in the
same directory as the tests, which is only true on Windows.

The library path depends on the build configuration, which may not be
known until the actual build (e.g. with the Visual Studio generators),
so it can't be stored in the CMake cache for run.py to read. I didn't
want to hardcode into run.py where the library is on each platform,
either. So that's why I used the current scheme with the properties
file. It also makes running the tests without run.py a little easier.
Merge pull request #1637 from SpecLad:run-py-java-fix