Refactor model importing semantics.

Now we really support cyclical deps, and also the semantics are
generally better and less magical.