adds simple python cursor test and fixes bugs thereby revealed
Merge branch 'ql-refactor' of github.com:rethinkdb/rethinkdb into ql-refactor