DERBY-6314: Upgrade from 10.10 fails with ClassCastException

Make sure stored plans for metadata queries are cleared the same
way as trigger plans during upgrade, so that upgrade doesn't fail
if the format of the old metadata plans cannot be read by the new
version.

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