Fix a looping forever issue with 'module type of'
Fix a looping forever issue with 'module type of'

When expanding `module type of` expressions we loop in case there's
a nested instance of one. This adds some logic to avoid looping if
there's no change in the signature, which can happen if the
unexpanded module type of expression is in a different module.

Signed-off-by: Jon Ludlam <44f878afe53efc66b76772bd845eb65944ed8232@recoil.org>

ocaml-doc/odoc,ocaml-doc/odoc