Manually document py3compat module.

Automatic documentation doesn't work well with things that have alternative definitions inside conditional blocks, so I wrote some documentation manually.