SNOW-3654851: escape single quote and backslash in Lineage.trace (#4265)