* Use version compare to only remove kegs with lower version than the
current one, not higher version which might be from someone's
branch.
* Do the same for cache cleanup.
- Be conservative so that if a name detected from cache file is not
the same as its formula then don't clean it.
Closes#15914.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>