Optimized full SWID generation

Previously, when obtaining the list of all files per package, it was
all done in the beginning, before generating all the XML tags. Now the
files per package are fetched just before creating the XML tag, thus
speeding up the time until XML tags are outputted.