repoview: extract a factory function of proxy class
This makes sure that dynamically-created class objects are isolated from
local binding of repo instances. The type cache is moved to module level
as it isn't tied to each instance.
#require docutils gettext
$ $TESTDIR/check-gendoc fr
checking for parse errors