QmlProfiler: Don't use the model factory if it doesn't exist

The model factory only exists if there is a plugin providing it. Also,
it's a good idea to initialize it.

Change-Id: I904bae1e733c37699a99e84e79c67ab4e8aea805
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>