Allow iterating over empty query results

Added an ability to iterate on empty query results. And a couple of, probably, incorrect tests for this condition.

Previously it was causing psycopg2.ProgrammingError: scroll destination out of bounds. One could overcome this by checking for truthy result before iterating, but I'm not keen.