Retry SQLCODE 1389 after flushing metadata cache

Sometimes caching of metadata objects causes the compiler
to incorrectly raise SQLCODE 1389: "Object <obj_name> does
not exist in Trafodion." This change reconfigures the
pre-existing auto-query-retry (AQR) feature to retry the
error, after first using a CQD to flush the metadata cache.
The change also includes the fix for a latent bug which is
now exposed. The latent bug caused duplicate diagnostic
conditions to be returned from the CLI when an unsuccessful
AQR has used CQDs.

Change-Id: I3136384d807a76eadc0f4f92ace14055eb646b84
Closes-Bug: #1331083
Merge "Retry SQLCODE 1389 after flushing metadata cache"