find_obsolete_pkgs: Remove trailing whitespace

git-svn-id: http://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2@22268 d3b55034-1cff-0310-a425-aefe953e1e90
find-obsolete-pkgs: Refactor to use a function

Try to separate out the logic into a separate function to make it
possible to use as a library and to add tests.
Rename 'reallyremove'
wip