qml: use reasonable source size for delegate images
Delegate images are meant to be cached, and put in the atlas. We have to use a reasonable size otherwise they can easily spoil the cache.
Currently source size is used as worst case (the largest the image can be), but most of the time the interface window size is wide enough to display multiple items, where in that case item size is not as large as the worst case.
Granted this will make images have poorer quality when the interface has such a size that only one/two items are visible per row, as then the items would scale up to use the all available width. However, it needs to be balanced.
I propose using the average case and not the worst case for the source size. I propose that we determine the average (nbItemPerRow) to be 3 for the moment. This means that we target the optimal quality when there are at least three items displayed per row and not less.
I used the formula provided in the comments, one line above.
Note that we can not (and probably should not anyway) do in depth optimization for this without having access to the private headers.
Request review @chub.