This patch adds handling for SecurityExceptions in places currently
lacking it. SecurityExceptions can be thrown by many file-related and
other Java APIs when running Jython in a restricted container.
This patch fixes the issue noted in 1185 and 1186, although this is
against trunk and not 2.2.*.

What security policy was this made to run against? We have an incredibly
simple test of starting up jython under a restricted policy in
test_java_integration
Having that test do a little more would also be really helpful in
getting this patch applied

This is for the security policy in the Google App Engine. It can
roughly be recreated by forbidding all write access to disk and read
access outside the working directory (which makes some
File.isDirectory() checks fail). The additional changes are because
SecureClassLoader and Compiler are not on the JRE whitelist.
Compiler.compileClass() is documented to be a no-op, so I do not think
removing it is an issue. URLClassLoader should work just as well as
SecureClassLoader.

I finally got a policy file together so I could test these fixes.
Needless to say it is still difficult to do any sort of real testing
(especially using our regrtest suite) w/o being able to write to the
filesystem. I have done some manual testing, but real testing of jython
in a write only environment is still a todo. Thanks James Robinson!