neo4j/neo4j — pull request #3498 by pontusmelke (2014-11-20 07:25:02+00:00)
Title: Fixed issue with prematurely exhausted iterator.

By exhausting the iterator on initialization, some queries lead to a lot
of unnecessary dbhits, e.g.
````
profile MATCH (n:topic)-[r]->(m:topic) return n,r,m limit 1;

+------------------+------+----------+-------------+----------------------+
| Operator | Rows | DbHits | Identifiers | Other |
+------------------+------+----------+-------------+----------------------+
| Slice | 1 | 0 | | { AUTOINT0} |
| Filter | 1 | 1 | | hasLabel(m:topic(0)) |
| TraversalMatcher | 1 | 11292978 | | m, r, m |
+------------------+------+----------+-------------+----------------------+

Total database accesses: 11292979
````
should ideally only touch a small portion of the graph but ends up touching something like
50% instead. This fix I believe fix this.