urlencode moved too

Signed-off-by: Doug Hellmann <doug.hellmann@gmail.com>
Change internal cache handling

The Python 3 UserDict was going into an infinite
loop when trying to access values that were not
in self as a cache. Move all of the cached stuff
to a special dictionary, and change __getitem__
to look there as well as calling the methods
that actually create the cached copies of the data.

Signed-off-by: Doug Hellmann <doug.hellmann@gmail.com>