Fixed #3747 -- cache extensions on x.509 objects (#3769)

* Fixed #3747 -- cache extensions on x.509 objects

* be kind to cpython, save a dict lookup

* flake8

* changelog
4 files changed