fix tests by restoring some imports

A few source files are imported by tests, so they need to import their
dependencies. The new scheme strips these known-to-be-duplicate import
lines (marked with a special comment) during 'setup.py make_versioneer'.