DERBY-6704 Hang in AutoloadTest.spawnProcess:JDBCDriversEmbeddedTest on Mac/jdk7,8

Backport of diagnostics patch derby-6704b, svn 1618088.

Patch derby-6704b: it collects std out and err for the spawned
subprocesses, and also forward the debug options "derby.tests.debug"
and "derby.tests.trace" to the subprocesses. If any of those are set,
we collect the std err and std out and print them interleaved with
that of the top process.

The patch will also try to get a jstack status of a hanging subprocess
before killing it (only works on Unixen) - hopefully this would work
also on MacOs; it uses a little dirty reflection to access a private
PID field in the underlying Process class object before trying a
jstack. For this to work, the test must also run using an Oracle JDK,
a JRE doesn't have a jstack.



git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/branches/10.11@1618089 13f79535-47bb-0310-9956-ffa450edef68