allow pages to be garbage collected while iterating over collection

Related to #106 (memory usage with large datasets)