make query results reusable

Return a clone of the rows that are used as query results so the query can be
executed multiple times.

Fixes #6