Further fixes for duplicate identifiers
As well as during loading, we also have to handle `includes` with
potentially duplicate identifiers during `lang_of.ml`. This commit
moves the 'synthetic parent' functions into path.ml and uses them
both in cmti.ml and lang_of.ml