upload: update session file in real time, and filter out (in session) already uploaded packages
In order to be able to collect (and provide to developers, who expressly asked for it) stats about each pipeline job's results (and show them directly in the dashboard), we should adjust the upload command so that:
- if filters out packages that have already been uploaded, so only new packages that have actually been added by the pipeline are showed in stats (dashboard)
- it updates the session file in real-time, also in case of upload errors due to Fossology timeouts (which may occasionally happen), so that it can be re-run on the same session in order to upload the missing packages while retaining the previous upload history (otherwise we would have some packages that result as already uploaded and would be excluded from the stats)