fixed bug PreparedStatement.getMetaData failed if result set was closed
reported by Emmanuel Guiton #bugfix#