DERBY-6216; XPLAIN feature does not work and gives ERROR XCL16: ResultSet not open
   backport of revision 1502795 from trunk; 
   clean merge, but added modifications to XplainStatisticsTest from revision 1518111 (DERBY-6297) not previously backported.


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