Issue ID: 18414
Summary: More lazy symbol resolvement
tl;dr: imports could reduce a lot of their overhead if the compiler would
resolve symbols only when required.
Ideally the compiler wouldn't even look at Foo and thus not open
Note that this is already done if `struct Foo` is a template.