ResourceSystem|Optimize: Store temporary auto-generated SpriteDefs in a QHash; cleanup

Previously an in-place O(n) algorithm was used to ensure only one
sprite definition is generated for a given name.