DRILL-3005: Ensure that only one outcome can occur for a QueryResult.
Includes removing QueryResultHandler close listener which should fix most times. For exceptional race cases, also added isTerminal condition which ensures only a single transition.