DERBY-5615: Permission problems with classpath subsubprotocol
DERBY-5615: Permission problems with classpath subsubprotocol

Change the structure of CPFile.getInputStream() back to what it was
before the original fix for this issue (revision 1582655), but with
doPrivileged() calls around all operations that require privileges.

The restructuring in the original fix apparently prevented some
resources from being freed, so that DatabaseClassLoadingTest and
NativeAuthenticationServiceTest failed on Windows platforms because
they could not delete the jar file that contained the classpath
database.

git-svn-id: 2c06e9c5008124d912b69f0b82df29d4867c0ce2@1582754 13f79535-47bb-0310-9956-ffa450edef68

trejkaz/derby,trejkaz/derby,apache/derby,apache/derby,apache/derby,apache/derby,trejkaz/derby