fix clearing zipimport._zip_directory_cache on pypy

pypy uses a custom zipimport._zip_directory_cache implementation class that
does not support the complete dict interface, e.g. it does not support the
dict.pop() method.

For more detailed information see the following links:
  https://bitbucket.org/pypa/setuptools/issue/202/more-robust-zipimporter-cache-invalidation#comment-10495960
  https://bitbucket.org/pypy/pypy/src/dd07756a34a41f674c0cacfbc8ae1d4cc9ea2ae4/pypy/module/zipimport/interp_zipimport.py#cl-99

--HG--
extra : rebase_source : 95cff7946455f0a4422d97eecab11164a9ddef10
update zipimporter cache clearing related code comments

--HG--
extra : rebase_source : c8c77d96880275e34c1580991c2d70486b6d0e00
extract duplicate code

Extracted code for collecting a list of zipimporter cache entries related to a
given path into _collect_zipimporter_cache_entries().

--HG--
extra : rebase_source : 54ab881d794f95467e811511433a2cd31595339e
extract function for updating zipimporter cache data

_update_zipimporter_cache() extracted from _uncache() &
_replace_zip_directory_cache_data().

Code cleanup done in preparation for adding a bit more detailed cache item
clearing logic, so that would not require adding a separate function with yet
more code duplication.

--HG--
extra : rebase_source : e2e956e042c7cbfabe2c31ecc58a4f76c91f40aa
clear cached zip archive directory data when removing it from cache

This is an extra safety measure to avoid someone holding a reference to this
cached data and using its content even after we know that the underlying zip
archive has been removed and possibly even replaced.

Change suggested by PJ Eby (pje on BitBucket) in a setuptools pull request #51
comment:
  https://bitbucket.org/pypa/setuptools/pull-request/51/diff#comment-2018183

--HG--
extra : rebase_source : 6de2309bc7446647749cfe78ab00e0230a07f92f