Rework atom handling

Move atom tokens to their own modules.
Rework various string formats

Prolog has three separate formats for strings: atom, code lists and
string objects.  They all have similar quoting and escaping rules so we
can use a single DCG for them.