SNOW-3718303: Correctly escape special characters in comment/collate/subfield/flatten SQL (#4271)