Optimize QHash usage in QResourceManager.

This reduces the amount of hash lookups, leading to a nice speedup:

before:

RESULT : tst_QResourcesManager::benchmarkAllocateSmallResources():
     44,848,672 instructions per iteration (total: 44,848,672, iterations: 1)
RESULT : tst_QResourcesManager::benchmarkAllocateBigResources():
     46,634,161 instructions per iteration (total: 46,634,161, iterations: 1)

after:
RESULT : tst_QResourcesManager::benchmarkAllocateSmallResources():
     40,915,522 instructions per iteration (total: 40,915,522, iterations: 1)
RESULT : tst_QResourcesManager::benchmarkAllocateBigResources():
     42,700,992 instructions per iteration (total: 42,700,992, iterations: 1)

Change-Id: I0c4cd2f0a819d427f5af32de007b461793217464
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>