Add mandatory docstring tests to pywikibot/core.

Change-Id: I3588b0d37d2eafcb7af61d037703f62becf95f25