Reduced heap alloc/dealloc per frame when performing some string key-value lookups.

When running with GP_USE_MEM_LEAK_DETECTION I've noticed that new/delete gets called every frame due to string allocation. We should aim to avoid these per-frame allocs up as gameplay doesn't have a small block allocator and fragmentation/cache misses/dynamic allocations are expensive.

I've just fixed up the two cases that I came across in my project but I'll do the same for any further ones I encounter.