Update SExp rendering and cleanup code

A bunch of minor stuff around SExp

1. Make the default rendering roundtripable (i.e. parse and sexp, to string, parse that should give same result)
2. Move the parser logic into a separate file
3. Improve the tests and fix a bug in the string escaping logic.