Python3 annotations

As the commits will testify, this is not my work, I'm only the janitor here :-)

I've brought in @jlowin's Python 3 annotations work, merged some conflicts, and re-added some code that got dropped during the merge.
Typo.

Also, suggest using `# doctest: +SKIP` rather than explain details about testing.  In general development details like this should probably be hidden from user-level documentation