nitvm: Introduce a custom algorithm for ordering superclasses

Signed-off-by: Julien Pagès <julien.projet@gmail.com>