fix uaa traces being cut off
upload: don't send a .zip if all resources matched

prune empty directories after removing matched resources,
so that no .zip is created

[finishes #44037069]
fix instances in app summaries not being assigned

[finishes #43530637]