17830: preserve line endings of original file when updating keywords.

This fixes the test failures on Windows from the new tests, and
includes test fixes as well as the module fix.
ftplib: update connect() docstring by mentioning 'timeout' argument
merge heads