Fix inconsistency in calls to reindex
The marking of the layer state should be done in the reindex function,
as that is the logical place to do it, and it also means calls to
reindex behaves the same. We were calling reindex either in the sync or
in the prepareLayerForRender call but the layer nodes where only marked
in the sync call, creating this inconsistency. In practice this did not
matter as we're always going through the sync, so this is for future
proofing.
Pick-to: 6.11
Change-Id: I4ea6422c7888544839abaf2ec3352dadb81fb2b8
Reviewed-by: Andy Nichols <andy.nichols@qt.io>