Fix #11329 Graduated renderer style not saved in postrgres

@NathanW2 @gioman

Fix for bug #11329 - saving graduated renderer style in postgres database. 

This is a minimal change to the style saving code ensure that SQL strings for inserting and updating styles into a postgres database will not be corrupted if the style itself contains a string such as %1, %2, %3. This applies in the graduated renderer style by default now, though could apply in any style which includes user entered strings (eg anything with expressions)