[Upgrade] Replace cursor.hasNext() with cursor.next(). Removed in rethinkdb 1.13