Decoupled RepositoryModel from package cache build

Besides the Packages property it wasn't using the actual model. No point
in making it rely on the repository model for essentially a simple list
of package wrappers.
Now builds cache to a local variable before assigning to repository

Allows the repository to maintain the last list of packages it knows
about if it can't contact the repository