extendModules

also add Prelude to the module list, not just to the cached prelude
separate phases for parsing, extending and caching

this also fixes a bug whereby Prelude was no longer implicitly imported
into the user prelude, because the extended module list made it look as
if Prelude was already there.