Fixes in this commit include use of list comprehession instead of map,
since on Python 3 map returns iterator, not list; add proper iterator
interface for HookedCursor and some other minor changes.
Partially-implements: blueprint python-py3k
Change-Id: I211477cbd018b0dd2ffe0d280ff24dd4c5021324