model: factorize `select_most_specific` from `lookup_*_definitions`

Signed-off-by: Jean Privat <jean@pryen.org>
model: select_most_specific behave correctly when given comparable propdefs

Keep all occurences of comparable but distinct propdefs.
This case should not occurs in sane usage of the function.
But having a good behavior is good nevertheless.

Reported-by: Lucas Bajolet <lucas.bajolet@hotmail.com
Signed-off-by: Jean Privat <jean@pryen.org>
nitg: Fixed modelize_property to print an error when two redefs of the same method occur locally.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Merge branch 'fix_lookup_definitions'
Merge remote-tracking branch 'lucas/local_redef_fix'