Don't set the doctest encoding

This breaks when sys.__stdout__ is None, which can happen on Windows. It is
not needed anyway because the stdlib doctest already does the same thing.

Fixes #2681. Thanks to Vivek Mohta for the report.