QQmlMemoryProfiler: Fix dangling pointer use.

toUtf8 returns a temporary, accessing constData isn't safe

Change-Id: I3c4d077f24cee0eaf1df230c4d8079619967b51a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>