Updated the Python implementation to match the C implementation.

Untested. I'll let travis take the first crack. Man, I need to
figure out tox.

Also, I'm not happy with the config variable names I originally
picked.  I'll fix those after the tests pass.
get rid of the "unreleased" version header.  It's best to decide the
version # when we're ready to release.