DERBY-6496; Optional tool registration may fail because the CompilerContext is not always available at execution time.
   backport of revision 1574752, revision 15749237 and revision 1574946 from trunk.


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