closing query results properly

all kinds of query result should be properly closed before closing the connection itself
`Iterations.as*(..)` methods are closing the underlying `QueryResult` properly (if it implements the `CloseableIteration` interface).