Refactored doctest helpers out into docsix.