Fixes to aptpkg.install to ensure that if the version is specified for a particular package and that version is already available in the package repository then a refresh of the package database isn't required.  This works if the option version is passed or version is included in the pkgs option.  If any packages are included without a version then a refresh is performed.  An additional option was addeded to aptpkg.latest_version, show_installed, to return the latest_version even if the package was installed.
fixing a typo which broke automated tests.
another fix for changes that were breaking automated tests.
Merge pull request #13969 from garethgreenaway/13349_apt_update_refresh

Fixes to aptpkg.install
merge commit