Downloader: enhance sorting order for modules

framework > updates > installed > not installed
Downloader: move getLatestVersion() to RepoLoader class