Fix #10535 (legend symbol items for graduated symbol renderer)

The implementation used temporary symbols which are only valid
between startRender()/stopRender() calls and was breaking
also composer legend.