Major pyflakes in pywikibot/

- site contains two newimages(), the latter one of which was broken.
- site.protect added unused errdata values.
- method cap_answerwikipedia does not exist.
- sys._getframe exists for py 2.1+, which is above minimum supported
  version.
- compat/ - use __all__ to specify the unused symbols are for export.

Change-Id: Ia0010c878881e30822db6d7e928534ce15670584