C3 method resolution order implementation based on algorithm described
in The Python 2.3 Method Resolution Order, v1.4, by Michele Simionato
available at http://www.python.org/download/releases/2.3/mro/. Some
tests also copied from Perl module Algorithm::C3.