sunjavaplugin.cxx: extracted function for Java version check

extracted the (duplicate) code which is responsible to check the Java
version requirements in the two functions
"jfw_plugin_getAllJavaInfos" and "jfw_plugin_getJavaInfoByPath"

Change-Id: I8acb198c4b4aaee77dc84bc42ff1fc2e0da2aba7
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Pass by ref

Change-Id: I88def7e41a31948d1d7205cd5522b63de6be5f80