Limit pkg.latest to 1 refresh per run unless overridden

This fixes #6292 by moving the rtag check to the call to
pkg.latest_version, and never refreshing if/when pkg.install is run.
Merge pull request #6293 from terminalmage/issue6292

Limit pkg.latest to 1 refresh per run unless overridden