pep257-D205 fixes in pywikibot/

Fixes all D205 issues within the library,
and miscellaneous pep257 issues in the same code.

Also changes wikidataquery.Query.__str__ to raise
NotImplementedError instead of NotImplemented.

Change-Id: I1bd1375ffe01025b43c307cd1828471fbb5e05d9
Merge "pep257-D205 fixes in pywikibot/"