nitvm: Better algorithm of superclasses ordering

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