Improve memory usage of libsyntax

Replaces some usage of `.to_string()` with `.into_string()`