FIX part of #1372, improvements to the recompilation checker
This patch adds a check that each imported module is listed in
the dependencies from the previous interface. It catches the
following cases and forces recompilation:
- an exposed package has been upgraded
- we are compiling with different package flags
- a home module that was shadowing a package module has been removed
- a new home module has been added that shadows a package module
I haven't yet added the package timestamping as described in #1372.