DERBY-6211: Add ability to plug custom trace logic into the optimizer.

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