The version iteration code missed certain combinations:
KV=1.2.3.4
skips: 1.2.3, 1
KV=1.2.3
skips: 1
Simplify the code to use a loop and build the list of versions directly
instead of unique variables per version component.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>