java: fix indentation issues
java: remove redundant local variable
java: make 'java' module depend on 'fonts'

Reduces duplication.
java: add copyright banner to usr.manifest
java: do not print uncaught exception form the child context on the console

The parent context which is doing join() prints it anyway so we end up
with duplication. Also, currently when running java tests which expect
contexts to fail the output is polluted with stack traces which do not
denote failures.
tests: detect ContextFailedException as a failure pattern
java: make runjava.jar domain all-privileged

When application installed a SecurityManager, child protection domains
would have been declined the right to read files from their jar. This
was making apache derby fail with this:

java.util.MissingResourceException: Can't find bundle for base name org.apache.derby.loc.drda.messages, locale en
	at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1499)
	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1322)
	at java.util.ResourceBundle.getBundle(ResourceBundle.java:795)
	at org.apache.derby.iapi.tools.i18n.LocalizedResource.setResource(LocalizedResource.java:184)
	at org.apache.derby.iapi.tools.i18n.LocalizedResource.getTextMessage(LocalizedResource.java:311)
	at org.apache.derby.iapi.tools.i18n.LocalizedResource.getTextMessage(LocalizedResource.java:273)
	at org.apache.derby.impl.drda.NetworkServerControlImpl.localizeMessage(NetworkServerControlImpl.java:3536)
	at org.apache.derby.impl.drda.NetworkServerControlImpl.localizeMessage(NetworkServerControlImpl.java:3492)
	at org.apache.derby.drda.NetworkServerControl.installSecurityManager(NetworkServerControl.java:705)

The bundle actually exists and resides in derbynet.jar but since we
have a SecurityManager installed and runjava.jar domain, which is a
parent of derbynet.jar, does not have permissions for reading other
jars than itself we fail on permission check inside the class
loader. When the same code is run on the host it passes the check
because derbynet.jar is invoked directly from an all-privileged
context. I think the solution is to make our runjava.jar
all-privileged by default. One way to do that is to grant the
permissions explicitly in the java.policy file, or put runjava.jar in
the extensions directory (/usr/lib/jvm/jre/lib/ext). The latter is
simpler so I went with that approach.
tests: add test exploiting issue with protection domain permissions
java: grant exitVM permission to isolates by default

The OpenJDK's launcher does this, if we want to behave the same we also should do this.
tests: add test for exitVM permission under presence of SecurityManager
libc: add getgrnam_r for porting CRuby

Signed-off-by: KANATSU Minoru <icc.pot.tyew272@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
libc: move getgrnam from runtime.cc

Signed-off-by: KANATSU Minoru <icc.pot.tyew272@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Merge branch 'java' of https://github.com/tgrabiec/osv

Fixes issues with running apache-derby on OSv reported by Takuya.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>