GROOVY-5801: sql.firstRow() can be incredibly slow

implemented as suggested by Sam Perman

see: https://jira.codehaus.org/browse/GROOVY-5801
Merge pull request #137 from PascalSchumacher/GROOVY-5801

GROOVY-5801: sql.firstRow() can be incredibly slow