Adds JUnit tests for Java wrapper

This is an old pull request (https://github.com/Itseez/opencv/pull/231), adapted to target 2.4.

This commit adapts the Android tests to work with desktop Java. The tests can be run by executing the automatically generated script at build/bin/opencv_test_java.sh. Detailed error messages are written to build/modules/java/java_test/.build/testResults/.

It appears all tests pass, excepting a number of tests involving descriptors from features2d. The correct Java interfaces are generated, but the corresponding native code is not being generated. This is bizarre, as the correct native code is apparently generated for Android.