Only run refresh_db once per salt run

As presently contstructed, pkg.refresh_db is run for every call of every
pkg.installed and pkg.latest state, and the refresh param for these
states is ignored.

This commit fixes it so that the rtag isn't created for every call, and
that a pkg.refresh_db is only done when refresh == True and the rtag
exists. After the install is run, the rtag is removed, keeping
pkg.refresh_db from being run in subsequent pkg states within the same
state.sls or state.highstate.
Make pkg state refresh if rtag exists

After further discussion with Tom, the intent is that there is a single
pkg.refresh_db each salt run. This commit reverts that particular change
from the previous commit.
Merge pull request #5751 from terminalmage/issue5733

Limit to one pkg.refresh per salt run